How to work nicely and sound with Git (Gitlab/Github):
1 - Let's get our local updated before everything
git fetch --all
2 - Now we start a new branch (from master!)
git checkout origin/master
(or git checkout upstream/master or similar depending on your setup)
and
git checkout -b feature-a
3 - Let's commit whatever the changes we have done
git add .
git commit -am "commit message"
4.1 - There are no changes on origin/master (we work alone) - we can push it to the git server
git push
4.2 - There are changes on origin/master - we need to rebase
git rebase -i origin/master
and solve conflicts...
Once everything is solved you can push it to the server.
5 - Open Gitlab or Github and create a Merge/Pull request