Merging branches in Git Bash Windows

Below are the things i executed in order in my local Git Bash for Windows

  1. I created a new clone from a remote repository

  2. exit code from windows console app not available in git hook script
  3. Git colors don't display in Windows command prompt
  4. Git command to get all folders with changes
  5. GitForWindows keeps asking for OpenSSH password (Wish Application)
  6. can't pop named stash in git
  7. Git post-receive hook not working
  8. I created a new local hotfix branch from master

    git checkout -b hotfix-1.12

  9. Did the changes i wanted on the hotfix-1.12 files

  10. I did the commit
    git commit -m “commit message”

  11. Now went back to develop to merge the changes
    git checkout develop

  12. Now i merged it

    git merge –no-ff hotfix-1.12

It updated develop without any problem but it doesn’t work as expected for master. Below are the respective commands

  1. Back to master
    git checkout master

8.Merge below doesnt work
git merge –no-ff hotfix-1.12

It says Alredy up-to-date. But its not. The changes i made are not reflected when i check.
Again im doing all this in the Bash in Git for windows.

Do you see anything wrong? How can I successfully merge hotfix-1.12 into master?

  • Git pull doesn't know which branch to merge with
  • how do I change the location of a Git repository
  • Is there a way to stream data into GIT instead of passing in file names?
  • git ignore specific directories exception
  • How can I set to fetch only some branches from remote
  • How do I force fetching of tags if I have the --no-tags option set
  • One Solution collect form web for “Merging branches in Git Bash Windows”

    You can try several things to figure out (or try to fix) where you went wrong.

    1. Run git log --graph --all '--pretty=tformat:%h %Cred%d %Creset%s' to see what Git has recorded as far as your commits, and on which branch they are. The output is fairly self explanatory, you will see the commit history, along with where all the branches currently are (colored in red). This will show clearly what you merged onto which branch, where they diverge, etc.

    2. You can blindly (and destructively) try to merge again: git checkout master; git reset --hard origin/master; git merge --no-ff hotfix-1.12 (Warning: this will wipe out your working directory changes, AND your local commits to master which you haven’t pushed yet!)

    3. If all else fails, you can reset the master branch (git reset --hard to reset to the last local commit, or git reset --hard origin/master to reset to the last fetched remote commit) and then git cherry-pick your hotfix commit(s).

    In any case, do not push the merged branches upstream until you have figured out and performed your merges correctly and fully.

    Git Baby is a git and github fan, let's start git clone.