Intro to Github

2016-06-06 01:16:00 +0000, 2 years and 4 months ago

How to make a repository, and have it tracked via Github:

cd /to/working/directory
git init
git add *
git commit -am "changes-description"
git remote add origin http://github/remote/repo-url
git push -u origin master

To download (clone) someone else’s (or your own) repo:

git clone http://github/remote/repo-url ~/the/dir/you/want

To get new changes from a Github repo:

git pull origin master

Remove folder from Github but NOT locally:

git rm -r ~/some/repo/folder

To add a submodule, i.e. external repository

git submodule add

Git email test for different folders etc:

git config --global
git config --local "Your Github e-mail"
git config --global
git config --local "Your Github username”

To remove the git tracking from a folder, do:

rm -rf .git/

Proceed to delete the Github repository online.



there's some rate-limiting going on with my comment provider atm, so i'd reccommend copying your message incase it gets blocked and retrying