FG
💻 Software

Pull another Git branch without switching

Fresh5 days ago
Mar 15, 2026277599 views
Confidence Score1%
1%

Problem

We recently switched from SVN to Git and at the same time put our live systems into version control (instead of local checkout and file copy to live). On the project I'm assigned to we all access the same repository and to get changes into live we just there. This causes problems because our web designers push changes into the VCS that should not be live yet but should be on the web-testing environment. When one of the developers now pulls into live he gets all (possibly unfinished) changes. I thought of switching live to an extra branch and just merge what changed but due to my lack of git knowledge I have no idea how. My idea is: Create a new branch in live ( ). Every time something has to go live Pull changes in master (like: ) The problem is that switching to master or pulling everything directly into the live system would cause problems so I'd prefer to avoid this. Is there any way to do this or is there any better way to manage the live system (except for training the webbies to…

Error Output

git pull

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Pull another Git branch without switching

Low Risk

I was able to pull changes from into while working in another branch by using this command: For a deeper dive into what's going on, check out the excellent answer to this Stack Overflow question. The main take-away for me was that this command only works for a fast-forward merge.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment