View Single Post
  #5   Spotlight this post!  
Unread 15-08-2012, 23:17
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: How to setup version control on Github?

WHOOO! Finally figured it out after some google-fu

For others' reference, here are the steps I took:

Create your new repo on Github, take note of the https:// address in the edit bar (not url bar)
Install Git Bash from the Git website http://git-scm.com/downloads/
Open Git Bash
Type the following:

(Replacing "Username" with your Username, and "directory" with your directory.)

Code:
cd /c/Users/Username/directory-of-project/
Should now show a yellow highlighted directory preceded by a tilde (~)

Code:
pwd
Verifies that the current directory is the one typed above

Code:
git init

git add .
If it pops up an error message "LF will be replaced by... ", type the following: (If not, continue)

Code:
git config user.email "Your email address"

git config user.name "Your name"

git add .
Continuing...

Code:
git commit -m 'initial commit message'

git remote add origin https://github.com/YourAccountName/Project.git
That last address is the one I mentioned to take note of earlier

Code:
git push origin master
At this point it will give you a login prompt for github. When you type the username and password the characters will be invisible, but they're there. It confused me at first.

It may give you an error. If not, great, if so, type

Code:
git pull origin master
and then when that succeeds,

Code:
git push origin master
And now you should be done. Refresh your github repository page and the code should be there.

Last edited by F22Rapture : 15-08-2012 at 23:27.