github commands

notes

I guess, because I didnt have this blog last year, I couldn’t find my notes about git and github repositories.

So I ran into situations where I tried to send committed projects from the local repository to the github – without realizing that I needed to pull any commits down from github first, using:

# git pull origin master

Merging just doesn’t seem to work well at all. So my advice to self would be, always pull from github before you start working on your code. Or even when you create a new github with a README.md file.

Useful commands:

add new file:

git add filename

commit any changed files

git commit -a -m "this is a commit"

send commits up to github

git push origin master