Git Tips and Tricks
1. Git Basics
(1) Start project management with Git : git init
git initgit init(2) Staging for Commit : git add
git addgit add [filename] # . uploads all changes to staging area(3) Save snapshot for version management : git commit
git commit(4) Add remote repository information : git remote
git remote(5) Pull code to local repository git pull
git pull(5) Push code to remote repository git push
git pushTip
(6) Other commands
2. README.md
README.md(1) Create README.md file
README.md file(2) Add simple content about (your own) principles
(3) Save and version management : add, commit, push
add, commit, push3. Shared Repository
4. Go back to specific point
5. Revert commits uploaded to remote repository
Method 1) Revert commit locally then force Push
Method 2) Use git revert
git revertClone only specific branch
Get specific branch from remote repository
Get branch from remote repository with same name
Get branch from remote repository with name change
Modify unpushed Commit message
git fetch
git fetchgit rebase
git rebase6. Using Submodule
What is Submodule?
Add Submodule
Update Submodule
Update main repo
Update sub repo
Last updated