Saturday, July 5, 2014

git stuff

general:
git add .
git commit .
git push origin master
git reset .
git rm
vi .gitignore
to remove local changes from (uncommitted) file:
git checkout filename
when creating a new project on gitHub, get it on PC:
mkdir wifiMonitor
cd wifiMonitor/
git init
git remote add origin https://github.com/NicoLugil/wifiMonitor
git remote -v
git fetch origin
git merge origin/master
After creating gh-pages (project page) using website, get it on local copy:
https://help.github.com/articles/creating-pages-with-the-automatic-generator
in essence:
cd repository
git fetch origin
# remote: Counting objects: 92, done.
# remote: Compressing objects: 100% (63/63), done.
# remote: Total 68 (delta 41), reused 0 (delta 0)
# Unpacking objects: 100% (68/68), done.
# From https://github.com/user/repo.git
#  * [new branch]      gh-pages     -> origin/gh-pages

git checkout gh-pages
# Branch gh-pages set up to track remote branch gh-pages from origin.
# Switched to a new branch 'gh-pages'

No comments:

Post a Comment