Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(19 edits) (+1)

Go to your command line to the directory you want to work in. 

The only command that should be done in the directory above your project folder

git clone <url> {set the remote repo url for the local repo, skip if remote repo doesn't exist.}

All the commands that should be done within the root project directory; cd <folder name> to move into it. and cd .. to move back.

git init {create a fresh repo, git clone implicitly executes this, skip if remote repo does exist.}

git remote -v {Tell git to show you existing remote. If no remotes print, do next line, otherwise skip next line}

git remote add <name> <url>  {do this to create a remote ie origin github.io/username/reponame to set a remote called origin pointed to github.io/username/reponame}

git status {red is unstaged}

git add * {add unstaged files to stage}

git commit -m "{message}" {make a commit of staged files to repo; message is not optional; you must have a string after ' -m '}

git push -u origin master {skip this if the remote repo already exist, otherwise you can skip the next line, just this once.}

git push <remote name> {read terminal output if this doesn't work and try terminal's suggested command. remote name, ie origin, check with remote -v}

Share if you have problems, I am subscribe to thread. This should at least get you started and working smoothly without much trouble. You could also try GitHub Desktop instead of the command prompt: https://desktop.github.com

Edit: Sorry about all the edits, but now I think everything is clear.

Edit: Sorry, realized another error!

Edit: Had to fix what was incorrect about creating local repo. Sorry if this was confusing!