bikedorkseattle
bikedorkseattle

Reputation: 991

Git merging with repos on origin

I'm a git green belt and having a hard time wrapping my head around a concept, and have been surprising unable info on this topic.

We've got a repo (we are using beanstalk) that has a master and a few branches by different developers. When you merge or rebase a branch, do you do that locally and push that merge, or do you accomplish this on repo server? When you merge a branch locally and push this to the repo, does git understand this and the merge is reflected there as well?

Upvotes: 0

Views: 54

Answers (2)

Emil Vikström
Emil Vikström

Reputation: 91973

You merge locally and push the result to the server. The merge is just like a normal commit in the repository.

Git will actually warn you if the target server have a newer version and merging is needed.

Upvotes: 1

smparkes
smparkes

Reputation: 14073

Merges always happen on your local repo. The post-merge push retains the commit history that includes the merge.

Upvotes: 1

Related Questions