Git Commands
Git log
git log - shows the commit history in full/detailed.
git log --oneline - shows commits in an abbreviated and "pretty" format.
Committing using a GUI.
The go to by Colt Steele is GitKraken innit .
Amending commits.
Say this is the error commit message : git commit -m 'some error commit message'
To amend run :
- git commit --amend
Upon amending , you can stage any unstaged files you may have forgotten to stage in the commit.
Ignoring files.
Used to tell git not to track some files listed in it.
Achieved by creating a .gitignore file in the root project folder.
- To add a folder :
folderName/ *.logwill ignore any files with the .log extension.
Use this site, gitignore.io to help create .gitignore files easily.
Pushing branches to github
TO push one branch:
To Push all local branches to github:
git push origin --all