-
git init - used to create local git repository in current DIR
-
git add <filename> or .(means all) - adds files to the staging area (readying files up for a commit)
-
git status - used to get status. it will show the difference between the working tree(most recent local REPO snapshot) and the staging area (index)
-
git commit - take everything in staging area and and put into the local repository (take a snapshot of you files)
-
git push - take local repository and push it to the remote repository ex. Github, bitbucket? Will ask to log in into github
-
git pull - pull the latest changes from a remote repository (if someone makes a change to the repository and you want the latest code/version)
-
git clone - copy/download remote repository into your current folder
-
git config --global user.name ‘First LastName’
-
git config --global user.email ‘emailAdress@email.com’
-
git rm --cached <filename goes here> - removes from staging area
-
git commit -m ‘enter text here’ - shortcut way to make commits and skip VIM
-
git branch <branch name> - used to branch off the master to maybe work on new feature or bug while not having to commit to the master branch when not finished with the new feature. So master branch is not always being changed
-
git branch - to see all branches in the repo
-
git merge <branch name> - make sure you are in the master branch
-
git remote - list remote repositories
-
git remote add origin <htttp://github/RepoInfo/Info> - use the link provided by github when you create a new repo
-
git push -u origin master - it will push you local REPO to remote github repo
-
Git clone <http://linkToRepo> - copies entire folder of remote repo
-
git pull - used to pull all the latest code changes