Supervisor config file for the process:
[program:gitea] user = root directory=/srv/gitea/ command=/srv/gitea/gitea web autostart=true autorestart=false environment = HOME="/home/root", USER="root"
$ git info ## Remote URLs: origin git@github.com:sampleAuthor/git-extras.git (fetch) origin git@github.com:sampleAuthor/git-extras.git (push) ## Remote Branches: origin/HEAD -> origin/master origin/myBranch ## Local Branches: myBranch * master ## Most Recent Commit: commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 Author: Sample Author <sampleAuthor@gmail.com> Added git-info command. Type ´git log´ for more commits, or ´git show <commit id>´ for full commit details. ## Configuration (.git/config): color.diff=auto color.status=auto color.branch=auto user.name=Sample Author user.email=sampleAuthor@gmail.com core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* remote.origin.url=git@github.com:mub/git-extras.git branch.master.remote=origin branch.master.merge=refs/heads/master
$ git mr 51 From gitlab.com:owner/repository * [new ref] refs/merge-requests/51/head -> mr/51 Switched to branch 'mr/51'
By combining commit, tag, and push into a single command, git-release saves a lot of keystrokes for executing three commands that often run in sequence.
To commit with a specific <tagname> and a custom message:
$ git release 0.1.0 -m <+ powerful feature added>
Create a file with changes:
git format-patch <target-branch>git format-patch <target-branch> –stdout patch_name.patchgit format-patch -1 <commit-hash>git apply –stat <patch_file_path>git apply <patch_file_path>git am <patch_file_path>Install:
sudo pip3 install pre-commit
To use it with black, add this to .pre-commit-config.yaml:
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.8
Then to set up the git hook scripts
run pre-commit install
Now pre-commit will run automatically on git commit!
pre-commit run --all-files