Git Push Arguments 2
Task
Push the contents of the local foo branch to the main branch on origin, explicitly giving different names for the source and the destination.
Requirements
- The source must be the local
foobranch. - The destination must be the remote
mainbranch. - Use a refspec in the form
source:destination.
Expected result
The remote main and the local pointer o/main must move to the commit of the foo branch. The local main branch must not move.
What you will learn
After completing this task you will be able to:
- read and write refspecs for push;
- push a local branch under a different remote name;
- distinguish the source from the destination of a push.
Goal
local
origin