If anyone is following along on this blog, I’m going to be using it as a notebook of sorts for my course at Thinkful. Heres a cheat sheet from their website I want to recall:
Use this cheatsheet as a reference for each of the steps in the basic git workflow.
How to commit your work for the first time in a new project:
- Initialize a repository: type
git init. Command line should say “Initialized empty Git repository”
- Check the repository: type
git status. It should show you the untracked files.
- Save your progress: track the file by adding it using
git addfollowed by each of the filenames, one at a time.
- Check what has changed: type
- Commit the changes: type
git commit -m "commit message"
- Success! If you type
git statusYou should see “nothing to commit, working directory clean”
Pushing your snapshot to Github:
- Go to Github.com and create a new repository
- Add GitHub repository as a remote branch: Use
git remote add origin firstname.lastname@example.org...(follow Github’s instructions for this line)
- Send changes to repository: type
git push origin masterto send your committed changes.
- To pull from Github: Use the command
git pullto keep your version up-to-date with the remote version