How to work with git on the command line

From OpenPetra Wiki
Revision as of 06:02, 10 December 2016 by Pokorra (talk | contribs) (→‎Commit your changes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page is not finished yet

Due to the change from Bazaar/Launchpad to Github, this page needs to be rewritten

Have a look at these pages:

Configure git

git config --global user.name "FIRSTNAME LASTNAME"
git config --global user.email "EMAIL@EXAMPLE.ORG"
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'

Clone the repository

Then on the commandline, in Git Bash, you can run:

git clone --depth 10 https://github.com/YOUR-USERNAME/openpetra

Commit your changes

It is best to create a branch for the feature/bug you are working on:

git checkout -b mynewbranch

Then commit your changes into that branch:

git commit -a

Push your changes to Github

This will publish your branch at Github, in your fork of OpenPetra:

git push origin

Create a pull request at Github

See https://help.github.com/articles/using-pull-requests/