🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: GitHub: all 10 questions

Quiz: GitHub · Question 2 of 10

What does git push -u origin main do the first time?

What does git push -u origin main do the first time?

  1. A.Deletes main on GitHub
  2. B.Pushes main and remembers origin/main as its upstream for future push/pull
  3. C.Creates a new local branch
  4. D.Clones the repository
Answer & explanation

Correct answer: Pushes main and remembers origin/main as its upstream for future push/pull

After -u, a plain git push or git pull knows where to go.

Can you get the rest right without peeking?

Take the timed Quiz: GitHub quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →