Intro to Github

Mon. Jun 06, 01:16AM, 1 year and 3 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.


Submit a comment