Using git and github

Git global

git config –global user.name “inaciose”
git config –global user.email inaciose@gmail.com

Git repository initialization

On server

git init --bare

On client

git init

Add files (what to be tracked . all files)

git add .

or (just one file)

 git add README.md

Commit changes (all the files)

git commit -m 'Initial readme file' -a

or (just one)

git commit -m 'Initial readme file' README.md

Send changes to server

git push origin [name_of_branch]

Get updates from gitub (on repo base folder)

git pull origin [name_of_branch]

There also the command

git fetch, but i dont understand it.

 

After fork or create a clean project on github, e may copy it to your computer and maintain the information to copy the changes again to the github (or any other git servers)

Clone a git repository

git clone https://github.com/inaciose/minix.git

In forks always start your modifications starting a branch

Create a branch localy

git checkout -b [name_of_branch]

Send the created branch to server (need login and password)

git push origin [name_of_branch]

Select existing branch

git checkout [name_of_branch]

List branches

git branch

Get updates from gitub (on repo base folder)

git fetch

Delete a branch on your local file system

git branch -d [name_of_branch]

To force the deletion of local branch on your file system

git branch -D [name_of_branch]

Delete the branch on github

git push origin :[name_of_branch]

 

https://help.github.com/articles/pushing-to-a-remote/

https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches