Git push

The thing to do after git-commit (send commits to a repote repository)

Cheatsheet

git push

Updates one or more branches, tags, or other references in a remote repository from your local repository, and sends all necessary data that isn’t already on the remote.

  • -d/--delete
  • -u/--set-upstream
  • --force-with-lease
  • --tags
  • -o/--push-option
  • -4/--ipv4: Use IPv4 addresses only

ReferencesLink to other things

Personal Config

I have most of my aliases on nix in the git-aliases file

[aliases]
ps=push
psf=push --force-with-lease
[push]
default=current

GitLab

The server options (--push-option), related to GitLab

  • -o ci.skip: Skips the CI pipeline So I do not need to add an [ci skip] in the commit)
  • -o merge_request.create
  • -o merge_request.target=<branch>
  • -o merge_request.remove_source_branch
  • -o merge_request.assign=<user>

Related Notes