usage git [debian]

based on:
https://github.com/bwl21/wortsammler/wiki/wortsammler-syntax #for git readme files
https://education.github.com/git-cheat-sheet-education.pdf #for git usage from commandline
http://stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git

install git:
sudo apt-get install -y git
sudo apt-get install -y git-core

setup git:
git config --global user.name "xxfreddyxx"
git config --global user.email "https://xxfreddyxx@github.com"

clone a git you want to edit:
git clone https://github.com/user_name/repo_name

get latest code from a already downloaded git:
cd repo_name/ #maybe this has not to be done
git pull

on your pc copy your files into ~/git-folder/repo_name

add new files:
cd repo_name/ #maybe this has not to be done
git status #to check what files changed
git add file1 file2 file3

push the latest code:
cd repo_name/
git remote -v

git add --all

add a commit:
git status #to check what will happen
git commit -m "note for the uploaded,updated files" #update the files

push the code to the global repo on github servers:
git show-ref
git push origin HEAD:master

how to delete a fork:
https://help.github.com/articles/deleting-a-repository/

another help:
echo "# mynewrepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/freddii/mynewrepo.git
git push -u origin master

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s