DEPRECATED

This space is obsolete and unmaintained. The entire content of the DM Developer Guide is now maintained at https://developer.lsst.io .

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The following is a basic and incomplete list of operations, which are illustrated below.

 

git pull

Fetches remote changes into the local clone, and merges them into the current working files.

git checkout

Replaces the current working files with files from a branch.

git checkout --track

Creates a local branch from a remote branch, links them, and replaces the current working files with files from that branch.

git fetch

Downloads changes from a remote repository into the local clone

git reset

Makes the current branch point to some specific revision or branch.

git reset --hard

Makes the current branch point to some specific revision or branch, and replaces the current working files with the files from that branch.

git merge

Merges files from a given branch into the current branch.

git push

Uploads changes from local branches to the respective remote repositories.

git add

Puts current working files into the stage (aka index or cache)

git commit

Commits staged changes to a local branch

git commit -a

Commits all modified files to a local branch (shorthand for "git add" and "git commit")

Git_operations.pdf

  • No labels