Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

Getting dev branch to same level as master

Solved! Go to Solution.

Hi @all

 

When checkout a dev branch, commiting some changes and push them to a remote, everything is working fine.

But, when i try to revert/reset/etc. the dev branch to the master branch it only works locally.

The remote branch is in that case the resetted commits ahead.

Deleting the dev branch on the remote works till an user push his local dev branch (with the resetted commits) back to the remote.

 

What is the best way to rebuild a fresh "dev" branch ?

 

Peter

1 Reply
Solution
Community Manager
Message 2 of 2

Re: Getting dev branch to same level as master

Hi @PeterSauber!

 

The answer to this depends a little on whether or not you want to keep your Git history. The simplest way to put things back to the master branch would be to merge changes from master into the development branch and then push the merge commit from your local machine to the remote development branch. This would keep all of the change history recorded.

You could also force push a revert to the development branch, but it would be important to ask the developers on the project to pull that revert onto their local machiens which can be hard to control.

There are probably other methods as well, but those are the ones that come to the top of my head currently. Hope that helps!