I am new to GIT and GITHUB and was doing some hands-on and bit curious whats the best practices when working in the branch.
I did the following :
- Created a branch (lets say branch9).
- Added a new file, then git add , git commit.
- I didn't merge it with master "git merge master"
- Instead I used this cmd "git push origin master" (so pushing the contents directly to master instead of pushing it to branch9)
- I see some weird things. I created a pull request from GITHUB and merged the files to master but after few mins the merge disappears.
What is the correct sequence of steps I need to do while working on branching in GIT?
Do I need to merge the contents from branch9 to master in local repo (git merge master) and then git push origin master
?