Alright ! I have created a branch prac
. I am doing my changes, committing them and merging them with master.
In short this is what I do usually for my workflow consisting of two branches namely - Master and prac. Whenever, I want to do something, I code in prac branch
git checkout prac
git add whatever, git commit -m "so n so"
git checkout master
git merge prac
I do not delete my branch usually to be in a frame of mind that I always have one branch for practice and master for showcase of final code.Comments are welcome to improve my mindset :D
Now, I deliberately hit git push
. I noticed the following
fatal: The current branch prac has no upstream branch. To push the current branch and set the remote as upstream, use
git push --set-upstream origin prac
Now, my questions is that if I set upstream for this prac branch to remote, then will I need to do merge ? Or how basically it's different from merging?
From what I understand, after setting upstream, I already have pushed the changes to main repo. So what will be left to merge ? Or does this pushes to some new instance/fork which has to be pushed later ?
Confusion my friends confusion!!!