Skip to content

Instantly share code, notes, and snippets.

@mplourde
Created October 1, 2014 21:26
Show Gist options
  • Save mplourde/0ad7c0c6ebe903e863b6 to your computer and use it in GitHub Desktop.
Save mplourde/0ad7c0c6ebe903e863b6 to your computer and use it in GitHub Desktop.
git commit steps
# after making a series of changes to a file or files, open git bash and use the following commands to commit and sync
# if you've added files to the repository, call 'git add' to add them to the repo
git add /path/to/file
# to commit all your changes, open git bash and change directory to the project folder. Use "pushd //28-arajohnsmit/myproject"
# to change to a directory on someone else's machine. Then enter the following command
git commit -a
# this will open a vim session for you to enter a message about your changes.
# In vim hit the 'i' key to go into insert mode. Type a brief explanation of your changes, then hit esc
# to leave insert mode. Type ":wq" to write the message and quit. If there were no issues, your commit is complete
# to push your changes to the remote repository on github, execute the following commands inside the project directory
git push origin master
# to pull changes from the remote repository, use the following
git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment