|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
How to setup version control on Github?
I'm new to programming and while I've played around with the Github for Windows client and Netbeans and such, I haven't managed to figure out how to push my current code to Github, and don't really know where to go from there once I do. Any tips?
|
|
#2
|
|||
|
|||
|
Re: How to setup version control on Github?
For a good tutorial on most of the features of git specific to github, try try.github.com. It only covers the command line side, but it's helpful in better understanding git. When committing with Github for Windows, it's as simple as commit and sync. As for netbeans, it's as simple as putting in your git url and github login information into the team menu settings.
|
|
#3
|
|||||
|
|||||
|
Re: How to setup version control on Github?
When 2337 looked into GitHub, I was recommended Pro Git by Scott Chacon (which is free), and was tremendously useful. I found the GitHub help to be useful when dealing with GitHub, but not with Git itself, the version control system.
As well, the GitHub for Windows client is very poor and not well-written. Frankly, my first ever experience with bash scripts (command-line) was with Git, and it was eye-opening. I highly recommend using Git bash. |
|
#4
|
||||
|
||||
|
Re: How to setup version control on Github?
I have the repo set up between GitHub and Netbeans but it's currently empty - how do I move my existing code to it?
|
|
#5
|
||||
|
||||
|
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/ Code:
pwd Code:
git init git add . Code:
git config user.email "Your email address" git config user.name "Your name" git add . Code:
git commit -m 'initial commit message' git remote add origin https://github.com/YourAccountName/Project.git Code:
git push origin master It may give you an error. If not, great, if so, type Code:
git pull origin master Code:
git push origin master Last edited by F22Rapture : 15-08-2012 at 23:27. |
|
#6
|
||||
|
||||
|
Re: How to setup version control on Github?
This looks like a great step-by-step method for teams that want to set up GitHub! I just noticed two small things:
|
|
#7
|
|||||
|
|||||
|
Re: How to setup version control on Github?
GitHub has some great articles on setting up your environment for using Git and GitHub (setting your GitHub username globally, etc) https://help.github.com/articles/set-up-git
They also go through the process listed above with Creating A Repository Anything past that, I agree with Colin, go with Pro Git, or check out the Git documentation http://git-scm.com/documentation |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|