If you have multiple ~/bin/ directories across different hosts and want to consolidate them into a single Git repository hosted on your own Git server, follow these steps. 1. Create a New Bare Git Repository on Your Git Server First, log in to your Git server and create a new repository:
Automatic merge failed;fix conflicts andthencommit the result.
shell> git status
1
2
3
4
5
6
7
8
9
10
11
12
13
On branch eric-merge
Your branch isup todate with'origin/eric-merge'.
You have unmerged paths.
(fix conflicts andrun"git commit")
(use"git merge --abort"toabort the merge)
Changes tobe committed:
Unmerged paths:
(use"git add <file>..."tomark resolution)
both modified:myCode.pm
1
2
shell>git merge--abort
shell>git status
1
2
3
4
On branch eric-merge
Your branch isup todate with'origin/eric-merge'.
nothing tocommit,working tree clean
IMPORTANT NOTE: Previous versions of git used different commands for this operation: Latest version: git merge –abort Older than version 1.7.4: git reset –merge Older than version 1.6.2: git reset –hard
Recent changes to git have made the push default choice a bit confusing – “matching” vs. “simple” I picked “matching” when prompted. This means that git push by itself will try to push ALL local branches, not just the one you are working on. Personally, I find that a bit mad, so I decided to […]
shell$ git log | head -1 commit a203e1bd04718bff10a3df4a3389c493c97c0432 Use the commit string as the last argument to the git revert command: shell$ git revert -m 1 a203e1bd04718bff10a3df4a3389c493c97c0432