🔀Git Push
Also known as Push
Sending your new commits up to the shared remote. Then the team can get them.
Think of it like
Think of it like a letter in your bag. Until you post it, no one else can read it.
Example
Emma pushes her dark-mode commits at the end of the day. The next morning, Jack pulls them and sees the new look.
Why it matters
Work that is not pushed only exists on one laptop. Pushing shares it and backs it up.
Definition
Example code
console
$ git push -u origin main
To https://example.com/ada/shop.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.Common mistake
Key takeaways
- 1Up to the remote. Your commits leave your machine.
- 2Pull first if told. Git refuses when you are behind.
- 3Commits only. Uncommitted work stays home.