#Git Commits For Non-Git Users
This is a guide to aid others not familiar with git to contribute to our TIL repo.
git pull origin master
git checkout -b <BRANCHNAME>
- add files/folders locally
git add .
to add everything in cur dirgit commit
- press
i
to enter insert mode, write title & message ESC :wq
to write-quitgit push origin <BRANCHNAME>
- Compare & Pull Request on website
git status
to see changed files in redgit add .
git status
to see updated files in greengit commit
( -m "MESSAGE" to skip Vim)git push origin <BRANCHNAME>
git fetch origin
git rebase -i origin/master
- squash to 1 in vim;
:wq
- reword commit messages
git push -f origin <BRANCHNAME>
git log
to view the list of commits on the current branchgit checkout master
git pull origin master
to be up to dategit merge <BRANCHNAME>
git push origin master
- Delete branch from web UI
git branch -d <BRANCHNAME>
to delete branch locally