Skip to main content

push โ†” to sync local Git Repo to remote

aka push

git push origin master -u

-Uโ€‹

flag to origin to Upstream remote

--forceโ€‹

flag to overwrite Commit History on remote Repo

git push --force origin __branchโ€‹

to push local Commit to remote Repo & FORCE sync to local (discard remote history) ๐Ÿ”ฅ bad for teamwork!

git push --force-with-lease origin __branchโ€‹

to push local Commit to remote Repo & SAFELY sync (avoid overwrite remote history) โœ… often mandatory to not get fired!

git push -u origin masterโ€‹

to push local Git Repo Branch at Master to remote Repo

Referencesโ€‹

  1. GCR โ†” Google Container Registry to maintain/store/ver/push/pull Container Image. has auto vulnerability scan for Container Image

  2. git push --force origin __branch โ†” to push local Commit to remote Repo & FORCE sync to local (discard remote history) ๐Ÿ”ฅ bad for teamwork!

  3. git push -u origin master โ†” to push local Git Repo Branch at Master to remote Repo

  4. git push --force-with-lease origin __branch โ†” to push local Commit to remote Repo & SAFELY sync (avoid overwrite remote history) โœ… often mandatory to not get fired!