I setup a new repo on a first-time GitHub account ok then setup my WP site as a repo via the cPanel version control plugin. After a LOT of guesswork, fumbling and Googling error messages i managed to get my site into my new GitHub repo. However, since i ended up using:
git push origin master --force
I now have 2 branches :
- Main - which was setup when i created my initial gitHub repo and
- Master which now contains all my wp files
Main branch contains the .gitigmore, license and readMe.md which was setup with the gitHub repo
whilst Master is the actual branch i want to keep. How can i get the (all important) gitignore file into Master and make master the ONLY branch since i never wanted two branches, not yet anyway!
I see there’s a way to choose which branch is the main branch so could i use this feature? Would it move merge/move the .gitignore file to master? then i can remove the main branch.
GitHub tells me that the Master branch is 1 commit ahead, 1 commit behind main - what does this mean?
Any help appreciated,