Hacker News new | ask | show | jobs
by tomjen3 2182 days ago
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.