Git — Force Git to Pull a Branch in it’s entirety. Ignore Merging.

Read below to make sure you’re in the same boat.

I had a branch set up on Server A that I committed to the remote repository.

I had a branch set up on Server B that I committed to the remote repository.

Now, Remote Repository has branch from A and B.

Pulling branch B or branch A from either server would result in merge conflicts.

If you are…

How to do I get git to pull overwriting /everything/ ? I just need exactly what is on the remote server.

Now I’m starting to sound very stupid: I just needed to do

git fetch origin branch

Apparently, git pull always merges with the current branch. Not proud to admit I’m just starting to get Git.

http://stackoverflow.com/questions/292357/whats-the-difference-between-git-pull-and-git-fetch

2 thoughts on “Git — Force Git to Pull a Branch in it’s entirety. Ignore Merging.

  1. Just a thought, use the “share” link on the Stack Overflow question to get a shorter link with your Stack Overflow userId in it. When visitors on your site click the link and visit the Stack Overflow post, you’ll earn clicks toward the Announcer, Booster, and Publicist badges!

    Thanks for the link. Good luck!

    James (jmort253)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s