If Github is being stubborn you can always use :
git push -f origin <branch>
This will force it to push to the current branch.
Found this blog helpful for merging github master and gh-pages branches.
git log –stat Will show changes made from each commit.
git diff name of commit name of commit See differences made from each commit.
git clone url to clone repository
px, pt, em, rem, %, vh (a much newer one)
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 add followed 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 status You 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 master to send your committed changes.
- To pull from Github: Use the command
git pull to keep your version up-to-date with the remote version