git config --global user.name "Your Name"git config --global user.email "youremail@example.com"git config --global core.editor vimgit init: Start a new git repositorygit status(gst): See the project status- Working areas: .git directory, staging area and working directory. Image
git add <filename>(ga): Add a file to the Staging Areagit add .(gaa): Add all files to the Staging Areagit add *.js: Add all.jsfiles to the Staging Areagit rm --cached <file>: Remove a new file from the Staging areagit commit -m "My first commit": Create a commit with a messagegit commit -v -a(gca): What I use most.-vis verbose, shows the diff at bottom and more meaningful information.-aadd all files that have been modified and deleted, but new files you have not told Git about are not affected.git help <command>: Open the manual for the respective command. USEFUL!git log(glg,glgg,glo,glog): Show all commits - history of the projectgit reset HEAD <filename>(grh): Remove an modified file from the Staging areagit checkout <filename>(gco): Remove an modified file from the Staging area and undo its alterations
Last active
March 25, 2016 11:01
-
-
Save ericdouglas/2081f655aa9443c9d296 to your computer and use it in GitHub Desktop.
Git commands
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment