Cheatography
https://cheatography.com
Gitutils
Gitutils is a tool to facilitate server-side operations when developing software that uses git repositories. It allows users to create forks and merge requests directly from the command line interface.
FORK : Fork existing repositories into your own personal space. Doing a fork is strongly recommended to freely experiment your changes and/or development in a safe working space without affecting the original project.
MERGE : Merge existing repositories from your personal space into the original repository. Merge has the purpose of joining different repositories to incorporate changes into repository. |
for the full documentation: gitutils.readthedocs.io/en/latest/
Installation
Use conda to install the latest stable version of Gitutils:
conda install -c paulscherrerinstitute gitutils
|
Gitutils is compatible with Python 3.5+.
Fork examples
Fork and clone: gitutils fork <group_name>/<repo_name>
|
Fork and not clone: gitutils fork <group_name>/<repo_name> -n
|
Fork, clean and clone: gitutils fork <group_name>/<repo_name> -c
|
Fork, clean and not clone: gitutils fork <group_name>/<repo_name> -c -n
|
Merge examples
merge (default title and description): gitutils merge
|
merge (from project's directory): gitutils merge -t <title> -d <description>
|
merge: gitutils merge -p <group_name>/<repo_name> -t <title> -d <description>
|
if -p is not indicated, gitutils fetches project from the .git/config
file.
|
|
Gitutils arguments
-h (help): |
Shows the help message and exit |
-e (endpoint): |
|
Fork arguments
-n (no clone): |
Indicates that the forked project will not be cloned after forking. A fork will be created on the server-side and no clone nor upstream will be generated on the local git server. |
-c (clean): |
Indicates to delete any existing fork project under your personal group. This might be necessary to fork and clone into a clean copy of the original repository. The desired forked project must not be a pre-existing forked project under your personal projects. |
To see the help message for fork: gitutils fork -h
Merge arguments
-p (project): |
Indicates the project to be forked. |
-t (title): |
The title of the merge request that is going to be created. |
-d (description): |
The description of the merge request that is going to be created. |
To see the merge help message: gitutils merge -h
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets