Github

I have been looking at git hub as this is popular for storing and working on projects

the following is a summary of how to get things up and running,  note you should

READ INSTRUCTIONS ELSE WHERE IF YOU ARE STUCK

SEEK HELP IF YOU GET STUCK as there may be errors, these notes were to help me, but may be useful to others,  so please DO NOT follow blindly.

irc : irc.freenode.net #git is a good place to get help

firstly

git hub basic how to

1. goto www.github.com and create an account
2. create a repository
2a git hub will then give you https://github.com/user/projectname.git

from : http://git-scm.com/book/en/Git-Basics you also need to
837 git config –global user.name “username”
838 git config –global user.email e-mail

You should only have to do this once or once on each computer, if you re-install then you may have to repeat this.

on command line

then

make sure remote repository is there
git remote -v

mkdir projectname
cd projectname
touch readme.md
git init
git add readme.md
to add files do
git add *.py
git commit -m “project name”
git remote add origin https://github.com/user/projectname.git
git push -u origin master
git push

or

do git clone https://github.com/user/projectname and it will create a local copy of the repository then you should be able to :

to add new files after all this do

touch mine.py*
git add mine.py
git commit -m “test file”
git push

if after git cloning you may have to

git remote add origin https://github.com/user/projectname.git
git push -u origin master

then follow the steps above,

or create a new file with code / content within it, touch simply creates a new file,
https://help.github.com/articles/set-up-git
http://git-scm.com/book/en/Git-Basics

 

added 19/9/2013

this link may be handy for cheat sheets

http://www.cheat-sheets.org/#Git