git commit
Terminology
<branch1>..<branch2> ¶ definition: 'All commits reachable by <branch2> that aren''t reachable by <branch1>.'
ety: ''
variants: ''
Commit ¶ An isolated change to source code.
git branch -f <branch> <commit> ¶ definition: 'Move (by force) the designated branch to the designated commit.'
ety: ''
variants: ''
git commit -m <message> ¶ definition: 'Add a message to a commit command.'
ety: ''
variants: ''
git diff —name-only <commit>^..<commit> ¶ List the files modified in a particular commit.
git log -p -1 <commit> ¶ Show the change made by a particular commit.
git log —pretty=oneline | grep <string> ¶ Find commit(s) with comments containing <string>.
git rev-list ¶ List commit objects in reverse chronological order.
Facts, Thoughts and Opinions
Commiting files to git, best practice
- git status # Confirm that the stage doesn't contain files that you don't want to commit.
- git add <file> # Add the files to the stage.
- git diff -b —cached # Show the changes that are staged. Confirm that these differences, and only these differences, are what you want to put in the current commit.
- git commit
Images
[[/div]]
- Subtopics
- Writings
Sources & Bookmarks
Name/Link | ¶ | Date |
---|