Re:Ask HN: Git alternatives that aren't so complicated?
by tomjen3 on Monday June 29, 2020 @11:31AM
(#23678504)
Git pull is just git fetch+merge
If you are confused at all use them in two steps, that also gives you more options such as (what I think you need in this case) merge remote master into your local branch (git merge origin/master).
Also I don't think you actually lost any code, if you do a checkout of the branch you did your work on, I think it should still be there based on your description.
Also git only pushes the current branch because it is designed to be used more decentralized than it often is: git does not assume you are ready (or want to) share all your branches right now.
If you are confused at all use them in two steps, that also gives you more options such as (what I think you need in this case) merge remote master into your local branch (git merge origin/master).
Also I don't think you actually lost any code, if you do a checkout of the branch you did your work on, I think it should still be there based on your description.
Also git only pushes the current branch because it is designed to be used more decentralized than it often is: git does not assume you are ready (or want to) share all your branches right now.