Add command to push branch up to a commit

This commit is contained in:
James Skemp 2023-01-07 21:29:54 -06:00
parent 2fbbafed72
commit f5bafe4e44
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,11 @@ git push -u origin my_new_branch
# Alternative way to push a branch to a remote, without permanently setting the upstream.
git push origin my_new_branch
# Push to a remote, but only up to a certain commit. This helps if the full push is too large.
git push origin c5831166a7189823919923c73a0e6346cbee71d6:main
# If the branch hasn't been created on the remote yet.
git push origin c5831166a7189823919923c73a0e6346cbee71d6:refs/heads/main
# Checkout a remote branch.
git checkout --track origin/<branchName>