Tuesday, October 14, 2014

Setting Up GitHub! [Again]

I finally think I got GitHub working, after a lot of issues. I did some research and figured out that the solution to my problem was to just open up terminal and start from there. I entered the following commands, thanks to some help from a StackOverflow post I found:
AndroidRPGNew
git init
git add .
git commit -m "first commit"
git remote set-url origin https://github.com/fccardiff/AndroidRPGNew.git
git push origin master


AndroidRPGServer
git init
git add .
git commit -m "first commit"
git remote set-url origin https://github.com/fccardiff/AndroidRPGServer.git
git push origin master


After that, I entered the following commands to remove cache files, etc. from my workspace:

AndroidRPGNew:
git pull
git rm -r /libs
git rm -r /out
git rm -r .idea/
git rm -r project-proguard.txt
git rm -r project.properties
git rm -r AndroidRPGNew.iml
git commit -m "removed cache files"
git remote set-url origin https://github.com/fccardiff/AndroidRPGNew.git
git push origin master


AndroidRPGServer:
git pull
git rm -r /libs
git rm -r /out
git rm -r .idea/
git rm -r project-proguard.txt
git rm -r project.properties
git rm -r AndroidRPGServer.iml
git commit -m "removed cache files"
git remote set-url origin https://github.com/fccardiff/AndroidRPGServer.git
git push origin master

Although it's a bit complex, I'm glad I got it working because now all changes are tracked through IntelliJ and updated automatically, which makes it a lot easier.

1 comment:

  1. Excellent! Yes, git works best as a command line tool. Great to see you've got this working. Now I look forward to blog posts that have links to the code in your repo.

    ReplyDelete