git --versiongit -statusgit add *file*- adds files to the repository so that Git knows to track their changes.git commit -m "message"- commits all added files to the repository as a change. With the-aflag, commits all changes to all tracked files. With the-mflag, allows you to specify a commit message directly on the command line instead of in your default editor.git config- allows you to make configuration changes to Git. With the--globalflag, makes these changes available across your entire system.git config --global user.name "Steven"git config --global user.email some@sss.comgit log- Show us a chronological log of all of our commits to the current repository.git checkout- "check out" a different version of the code from the one you're currently looking at.git diff- create a "diff" view to demonstrate what has changed between two different versions of your repository.- git log --all --decorate --oneline --graph - Decorated commit list.
git add- adds files to the repository so that Git knows to track their changes.git commit- commits all added files to the repository as a change. With the-aflag, commits all changes to all tracked files. With the-mflag, allows you to specify a commit message directly on the command line instead of in your default editor.
Branching
git branch branchname- create a new branch named branchname.git checkout branchname- switch to the branch named branchname.git checkout -b branchname- create a new branch named branchname and switch to that branch.
Cherry-pick
Cherry picking is the act of picking a commit from a branch and applying it to another.
- git cherrypick ff9a9ab2
Git remove last commit:
git reset --hard Point to next last guid.