Reference
Https://www.linuxidc.com/Linux/2016-11/136769.htm
Installation
Installing Git:apt-get Install Git
View current version: Git--version
Configure Git
$ git config--global user.name "Your name"
$ git config--global user.email "Your email Address"
View configuration information: Git config--list
Create a local repository
Git init [..]
Add file to Staging: Git add [...]
Git add-a added so there are files
Submit to Repository:git commit-m "comment"
View uncommitted files: Git status
Compare changes to uncommitted files: Git diff [...]
View Submit Log:git log [--pretty=oneline]
Version fallback: git reset--hard head^[~n]
Delete: RM [...] Need commit after
GitHub
Create SSH key:ssh-keygen-t rsa–c "[Email protected]"
Login to GitHub, add SSH key, save! Establish respository
Connect locally: Git remote add Origin https://github.com/RainbowMarquee/myvscodetest.git
Upload to GitHub, push to master branch: Git push-u Origin Master
Upload: Git push origin [branch name]
Dropdown: Git pull origin [branch name]
Long to Local: Git clone [link]
Branch
View branches: Git branch
Create a branch: Git branch name
Switch branches: git checkout name
Create + Switch branch: git checkout–b name
Merge a branch to the current branch: git merge name
Delete branch: git branch–d name
Linux learning record. 5.git & GitHub