I'm using git and github for my personal project and my git knowledge is not advanced. I've been previously using branches to which I commit my changes which I then merge with remote master.
But the last time I committed to Github I was trying to be fancy and tried to rebase my branch, something I had never done before. I can't remember what the exact commands were but they were something like this:
git checkout master
git pull
git checkout myBranch
git pull
git rebase -i master
git checkout master
git merge myBranch
However, I must have done something wrong because the commands resulted in that I lost my changes and I had to redo everything. I also lost all my local branches and now they're all marked as remote and I only have a local master branch (see picture).
So my question is. I just want to push my current changes to my remote master without losing all my changes like last time. What is the safest way to do that? Would a simple:
git pull
git add -A
git commit -m "msg"
git push
be enough?
edit: