Recall & Review
beginner
What does the
git push command do?It uploads your local commits to a remote repository, making your changes available to others.
Click to reveal answer
beginner
Which command uploads your local branch changes to the remote repository?
git push origin branch-name uploads the specified branch to the remote named origin.Click to reveal answer
intermediate
What happens if you try to
git push but your local branch is behind the remote branch?Git will reject the push and ask you to pull first to avoid overwriting others' changes.
Click to reveal answer
intermediate
How do you push all your local branches to the remote repository?
Use
git push --all to upload all local branches to the remote.Click to reveal answer
beginner
What is the default remote name used by
git push if none is specified?The default remote name is
origin, which usually points to the main remote repository.Click to reveal answer
What does
git push do?✗ Incorrect
git push sends your local commits to the remote repository so others can see your changes.
Which command uploads the current branch to the remote named
origin?✗ Incorrect
git push origin uploads your current branch commits to the remote repository named origin.
If your local branch is behind the remote, what should you do before pushing?
✗ Incorrect
You should pull the latest changes to avoid overwriting others' work before pushing.
How do you push all local branches to the remote?
✗ Incorrect
git push --all uploads all your local branches to the remote repository.
What is the default remote name used by
git push?✗ Incorrect
The default remote name is origin, which usually points to the main remote repository.
Explain in simple terms what happens when you run
git push.Think about sharing your work with friends.
You got /3 concepts.
Describe what you should do if
git push is rejected because your local branch is behind the remote.Imagine updating your copy before sharing your changes.
You got /3 concepts.