View Single Post
  #3   Spotlight this post!  
Unread 22-09-2015, 01:10
ShortCircuit908's Avatar
ShortCircuit908 ShortCircuit908 is offline
King of Hacky Fixes
AKA: Caleb Milligan
FRC #4450 (Olympia Robotics Federation)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2014
Location: Olympia, WA
Posts: 7
ShortCircuit908 is an unknown quantity at this point
Re: Need assistance uploading code to Github.

Simple guide using Git bash:
  1. Navigate to your workspace using the 'cd' command
  2. Code:
    git init
    (Creates an empty repository)
  3. Code:
    git remote add origin <SSH clone URL>
    (Adds the remote repository as 'origin.' <SSH clone URL> is the URL given to you by GitHub, resembilng git@github.com:Username/RepositoryName.git
  4. Code:
    git add -A
    (Adds current files to the repository)
  5. Code:
    git commit -am 'Initial commit'
    (Creates a commit with added files)
  6. Code:
    git push origin master
    (Pushes local commits to the remote repository)

It is recommended that you have a decent .gitignore file in the root directory of your workspace, in order to keep unnecessary files out of the repository. A good example of a .gitignore file can be found here.
Reply With Quote