tagged [git-merge]

How to keep a branch synchronized/updated with master?

How to keep a branch synchronized/updated with master? At the moment git is doing my head in, I cannot come up with the best solution for the following. There are two branches, one called and one call...

9 Apr at 00:28

Git merge hotfix branch into feature branch

Git merge hotfix branch into feature branch Let’s say we have the following situation in Git: 1. A created repository: mkdir GitTest2 cd GitTest2 git init 2. Some modifications in the master take plac...

How to cherry-pick a range of commits and merge them into another branch?

How to cherry-pick a range of commits and merge them into another branch? I have the following repository layout: - - - What I want to achieve is to cherry-pick a range of commits from the working bra...

23 Aug at 08:31

error: Your local changes to the following files would be overwritten by checkout

error: Your local changes to the following files would be overwritten by checkout [this one](https://stackoverflow.com/questions/14318234/how-to-ignore-error-on-git-pull-about-my-local-changes-would-b...

29 Aug at 15:41

Git error on commit after merge - fatal: cannot do a partial commit during a merge

Git error on commit after merge - fatal: cannot do a partial commit during a merge I ran a `git pull` that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool als...

Is there a "theirs" version of "git merge -s ours"?

Is there a "theirs" version of "git merge -s ours"? When merging topic branch "B" into "A" using `git merge`, I get some conflicts. I know all the conflicts can be solved using the version in "B". I a...

15 Oct at 15:24

Found a swap file by the name

Found a swap file by the name When I try to merge my branch with a remote branch: I got this message: ``` E325: ATTENTION Found a swap file by the name ".git/.MERGE_MSG.swp" owned by: xxxxxx dat...

12 Nov at 19:38

How do I 'overwrite', rather than 'merge', a branch on another branch in Git?

How do I 'overwrite', rather than 'merge', a branch on another branch in Git? I have two branches, `email` and `staging`. `staging` is the latest one and I no longer need the old changes in `email` br...

20 Mar at 00:29

How to update my working Git branch from another branch (develop)?

How to update my working Git branch from another branch (develop)? I made a new branch called `feature1` from the main `develop` branch a month ago. I've been working on `feature1` for a month now and...

12 Apr at 20:37

How do I resolve merge conflicts in a Git repository?

How do I resolve merge conflicts in a Git repository? How do I resolve merge conflicts in my Git repository?

Undo a Git merge that hasn't been pushed yet

Undo a Git merge that hasn't been pushed yet I accidentally ran `git merge some_other_branch` on my local master branch. I haven't pushed the changes to origin master. How do I undo the merge? --- Aft...

8 Jul at 05:11

How to merge specific files from Git branches

How to merge specific files from Git branches I have 2 git branches: 1. branch1 2. branch2 I want to merge `file.py` into `file.py` in and only that file. In essence I just want to work on the `file.p...

26 Oct at 13:48

What is the difference between merge --squash and rebase?

What is the difference between merge --squash and rebase? I'm trying to understand the difference between a squash and a rebase. As I understand it, one performs a squash when doing a rebase.

29 Dec at 00:28