Mount-Mockery - git

/mycreole/attachment/it/howto/git/git.png

Commit description

PYLIBS

MODULES

Working with a repo

git status Status
git submodules status Status of submodules
git add <target> Adding changes of new files
git push Pushing changes to server
git pull Pulling changes to repo
git reset <point_in_history> <target> Resetting added changes
git commit -m "Change Description" Commiting changes to server
git log Get Repo History
Check against server
Check Submodules against server

Diff

git diff[tool] Inspect changes
git diff[tool] <point_in_history> <point_in_history_2> Inspect changes between two commits
git diff[tool] HEAD <point_in_history_2> Inspect changes of a Branch

Branching and Versioning

Branch

git branch <branch_name> Create a Branch
git checkout <branch_name> Switch to a Branch
git branch Get a List of existing Branches
git merge <branch_name> Merge Branch to current branch
git push origin <branch_name> Pushing changes to server
git branch -D <branch_name> Delete a Branch

Version

git checkout <version_id> Switch to a specific Version

Tagging

git tag <tag_name> [commit] Add a tag to a commit
git push origin <tag_name> Push a tag to the repository
git push --tags Push all with all tags

Stashing

TBD

Submodule

git submodule add <url> <target_path> Add a Submodule to a project
git submodule update Clone Submodules or revert them to the dedicated version

Helpfull

Commands

git remote -v Get Repo URL
git remote set-url origin <URL> Change Repo URL

Points in History

HEAD The head revision
<point_in_history>^ The revision before head