Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Check status of the repo
    git status

  • Show current and available branches in the repository
    git branch -a

  • Show local changes in the code since the last commit
    git diff

 

Git workflow

The following section describes the workflow for developing software with git.

Clone repository

The first step is to clone the repository you want to contribute by using the flowing command:

git clone git@github.com:lcls-psana/"the repository you want to clone".git

The repository where you clone from is typically called "upstream".  This is the global copy of the repository that all developers share and work on together.

Git clone creates a local copy of the repository and any changes that you do to the repository only effect your local copy until you push the changes upstream.

This step only has to be done once.

Make changes to the code

After cloning the repository make changes to the code

Adding new files to the git repo

...