movw-0x16.cf


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 http://github.com/persons-repo-url

Git email test for different folders etc:

git config --global user.email
git config --local user.email "Your Github e-mail"
git config --global user.name
git config --local user.name "Your Github username”

To remove the git tracking from a folder, do:

rm -rf .git/

Proceed to delete the Github repository online.

Return

Submit a comment

?