hjc / JagTrack

An Android app for tracking the location of JagTran
15 stars 4 forks source link

Upload files #11

Open kdwilson opened 12 years ago

kdwilson commented 12 years ago

Is there any way to upload actual pdf files or .doc files to github?

hjc commented 12 years ago

Yes. But you have to use Git. There are plenty of explanations on GitHub and the front page of our wiki.

It's real simple to do, but just make sure you pull the master repository before you push (every time).

This is probably the easiest way to upload anything to any site, you can upload any file format, and any number of files with a few commands.

You'll need to create a git repository (git init), pull the files (git pull origin where origin is an alias setup via git remote add origin git@github.com:hjc1710/JagTrack.git), add your new files (git add ./*), commit them (git commit -am "some message here"), and then push them back (git push origin master).

It may seem like a lot of commands, but it only takes a few seconds to do all those, and then subsequent pushes and pulls will be faster (won't have to init the repository or do the remote add).

After you've setup the repository, any time you want to add a file, this is the sequence you should do:

git pull origin master git add ./* git commit -am "my message here" git push origin master

NOTE: This is all for command line git usage. There are GUIs out there, but I don't know how to use most of them and stick to the command line. Look up Git Bash for a Bash-style command line for Windows.

fornof commented 12 years ago

@kdwilson I'm using git-GUI.

Steps to use git-Gui in about 8 steps are located in my new screenshot-laden quickstart guide found here

  1. install Git-GUI&msysgit : http://code.google.com/p/msysgit/downloads/list
  2. when you click on Git-GUI it will popup a screen... clone the github, follow the prompts.... 3... the rest of the steps are with pictures in the document