Reputation: 1838
So, I have master
and development
branch on a GitHub repo.
Branch master
has only the initial commit, and all the development we've done is on the development
branch.
Recently, we've finished the core of the project, and users are using it now; soon we will start to work further on some additional requirements.
I am new to git and I was wondering what is a good practice now?
Should I merge master
into development
now (and do it every time we finish a big part of the project, that is for example made available to users), or should we develop on the development
branch until we are completely done with the project?
My main concern is that I could jeopardize the project and end up in some merge conflicts that will take time to resolve if I am merging the master
and development
branches too often (as I see many people end up in problems).
What is the best practice on this?
Upvotes: 3
Views: 584
Reputation: 10081
If all the development you have done is on one branch, why not make that master? Adding a branch just gives you an overhead if you're only using one.
In general it's good to merge master often so that the number of changes is smaller, lowering the risk of merge conflicts.
Alternatively you could use short lived feature branches, where you work on branches when developing new smaller features and regularly merge them into master.
If you want to be sure you can try merging locally and if you don't want to get rid of your attempt reset to what your remote has with
git push origin HEAD --force
Upvotes: 3