Git commands:
create a repo:
git init
Gives what files still need to be commit, ready to be added, ready to be commited:
git status
Commit: Get file ready:
git add *name of file.txt*
Message attached to commit:
git commit -m
“This is the description text for the commit. Tell us what you changed!”
To confim commit:
git log
git log --pretty=oneline
git log --pretty=oneline --graph --decorate --all
(use this one…)
inside of this command you will need to refer to this terminology:
– HEAD – this is the marker for the currently viewed commit
– orgin/master – this is the marker for the online github version
– master – this is the latest version on local git machine
This is how you view other commits:
git checkout #commitid
to peek/view an old commit
Create new brach:
git checkout -b &name*
Whats the difference between adding and committing? If you want to change multiple files and then only select a few to be commited this is how you do it.
get whatchanged
…
what different about the files b/t now and your last commit
get diff
push your commits to github
get push
check for files in the github
git pull
pull down both versions from git and github and try to merge
git fetch
MAKE SURE TO ADD BEFORE COMMITTING!!!!!
ZSH – prompt to replace bash
OHMYZSH