![]() In these exceptional cases one of our git-gurus will write an email to the whole team, explaining what is about to happen and what steps to take to update local clones. That is not to say we never reset master, sometimes (maybe once a year) someone might accidentally push a merge where we think that it would terribly screw up our history. The revert command will create a commit that reverts the changes of the commit being targeted. On the other hand, our shared server is configured to refuse forced pushes to master. This means everybody is free to do whatever they wish with their private branches, you can rebase or drop commits as you feel fit. ![]() Development branches remain "private" even when pushed to our shared server.Only pull using rebase ( tosetuprebase=always).In our team, we use the following set of rules: You should ask the project's maintainer to explain what to do in your specific case. ![]() If you want to revert a merge, you need to specify which parent you want to revert to ("mainline") with git revert -mainline. The interactive mode we added to the master branch has become a change conflicting with the changes in the style branch. The safe bet is to use git revert because you can always drop the commit later if that's the policy. The git reset command also includes options to update the other parts of your local environment with the contents of the commit where you end up.These options include: hard to reset the commit being pointed to in the repository, populate the working directory with the contents of the commit, and reset the staging area soft to only reset the pointer in the repository and mixed (the default. It all depends on the project's conventions.
0 Comments
Leave a Reply. |