Knowledge learned from https://www.udacity.com/course/how-to-use-git-and-github--ud775
A blog: https://blog.udacity.com/2015/06/a-beginners-git-github-tutorial.html
A blog: https://blog.udacity.com/2015/06/a-beginners-git-github-tutorial.html
git command
- git clone [github link] [(optional)folder name]
- git log
- git log —stat
- git diff first_id secod_id
- git checkout
- q
- git config —global color.ui auto
Atom as Git commit editorgit config --global core.editor "atom --wait"make a repository
git initgit statusgit addadd new work to the staging area, a bridge b/w working directory and repositorygit add .add all workgit commitwill open a text editor, write, save and close editor.git commit -m "messageno need to open text editorgit diff (empty)git diff --stagedgit reset --hardgit branchgit branch easy-modegit checkout easy-modeGitHub
git remotegit remote add origin url.gitset the url as your remote referencegit remote -vstands for verbosegit push origin mastersync to remote by master branchgit pull origin mastersync local by master branchgit config --global credential.helper osxkeychainpassword once for all
-git pull=git fetch+git merge- pull request is actually merge request