-
git config -g user.name [your-user-name]
-
git config -g user.email [your-email]
-
git init: initialize a new git repo on local
-
git status: check all the status of current git repo
-
git add: prepare to save the current state of the project
-
git log
-
git log --oneline
-
git reset
-
git checkout [commit-id]: change to previous commit
-
git checkout [main-branch (usally master)]: move to current lastest commit
-
git checkout -b [branch-name]: create branch and move to that
-
git branch: list all branches
-
git branch -d [branch-name]: delete branch-name
-
git merge [branch-name]: merge current branch with [branch-name]
-
git push [remote-link] [branch-name]
-
git push -u origin [branch-name]: push a local [branch-name] onto remote repo
-
git fetch origin: fetch all change from remote repo
-
git checkout -b [branch-name] origin/[branch-name]
-
git stash
-
git stash list
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|