dvcs

How do I git reset --hard HEAD on Mercurial?

别说谁变了你拦得住时间么 提交于 2019-12-02 17:48:42
I'm a Git user trying to use Mercurial. Here's what happened: I did a hg backout on a changeset I wanted to revert. That created a new head, so hg instructed me to merge (back to "default", I assume). After the merge, it told me I still had to commit. Then I noticed something I did wrong when resolving a conflict in the merge, and decided I wanted to have everything as before the hg backout , that is, I want this uncommited merge to go away. On Git this uncommited stuff would be in the index and I'd just do a git reset --hard HEAD to wipe it out but, from what I've read, the index doesn't

How are DVCS used in large teams?

血红的双手。 提交于 2019-12-02 17:40:39
I've recently started getting into Git on a personal project, and I can see how a DVCS might benefit us at work (which is a large enterprise software company, currently running Perforce). Feature work in my team for example mostly consists of developers creating their own branches; sometimes these are shared between small teams of developers. I think it would be more efficient in this instance to use a DVCS. In the more general case, though, I'd be interested to hear from people that use a DVCS at work, in medium to large teams. How do you deal with N-way merges? Is this even a common scenario

How does the 3 way merge in Mercurial/Meld work?

守給你的承諾、 提交于 2019-12-02 17:04:44
I'm working on a project where I have a commit that introduced a feature with major problems that weren't discovered immediately. Now I want to completely remove that revision while keeping the work following it but i'm having a hard time wrapping my head around this 3 way merge. Here is a simplified graph of my project. o changeset: 134:7f81764aa03a | tag: tip | parent: 128:451d8a19edea | summary: Backed out changeset 451d8a19edea | | @ changeset: 133:5eefa40e2a29 | | summary: (Change I need to keep keep) | | *snip 3 commits* | o changeset: 129:5f6182a97d40 |/ summary: (Change I need to keep

How do I “switch” with Mercurial

和自甴很熟 提交于 2019-12-02 16:55:53
How do I do what svn switch does, in Mercurial? That is change my working directory to switch to another branch in the repository? Flavius Stef hg update -r<REV> The update command will switch to a specified revision. The switch command does two things in Subversion: Update the working copy to mirror a new URL within the repository. This behaviour is similar to ' svn update ', and is the way to move a working copy to a branch or tag within the same repository. Rewrite working copy URL metadata to reflect a syntactic change only. This is used when repository's root URL changes (such as a scheme

Automatically mirror a git repository

孤者浪人 提交于 2019-12-02 15:53:57
One of the side-effects of using an external Subversion repository was getting automatic offsite backups on every commit. I'd like to achieve the same using Git. i.e. every commit to my local repository automatically commits to an external one so the two repositories are always in sync. I imagine that a post-commit hook would be the way to go. Does anyone have any specific examples of this? Manoj Govindan I wrote a post-commit hook for just this purpose. The hook itself is simple; just add a file named post-commit to your .git/hooks/ directory with the following contents: git push my_remote

How can I back out a merge in Mercurial and later remerge with that branch?

≯℡__Kan透↙ 提交于 2019-12-02 15:23:28
I have two branches, default and branch1. By mistake one person in our team merged branch1 with default. The content in branch1 is not yet ready to merge with default (it contains a major rework of the build & deploy environment). We did an experiment with 'hg backout', backing out the merge (not sure this is the right way to do it). Then the changes from branch1 gets deleted on default, which is fine - but we can not remerge with branch1. How should we solve this issue? There are many scenarios here where you might want to do this, I'll make each scenario a headline, so that you can find the

Are there any good graphical Git and Hg/Mercurial clients on Mac OS X?

天涯浪子 提交于 2019-12-02 15:12:14
I'm searching for compelling Git and Mercurial clients on Mac OS X. The most clients I've found so far were less compelling as I expected. Some of the clients are programmed even in Ruby or Tcl/Tk, which IMO aren't good OS X citizens in regard of integration in the OS. I have clients similar to Versions.app or Cornetstone in mind, which are Subversion-only clients. Perhaps somebody got an insider tip for me. I just thought I'd mention that SourceTree is a Mac OS X client for both Mercurial and Git, in one tool. I wasn't sure if you were looking for that, or just mentioned both because you hadn

Delete all local changesets and revert to tree

你。 提交于 2019-12-02 13:58:28
I'm using Mercurial and I've got into a terrible mess locally, with three heads. I can't push, and I just want to delete all my local changes and commits and start again with totally clean code and a clean history. In other words, I want to end up with (a) exactly the same code locally as exists in the tip of the remote branch and (b) no history of any local commits. I know hg update -C overwrites any local changes. But how do I delete any local commits? To be clear, I have no interest in preserving any of the work I've done locally. I just want the simplest way to revert back to a totally

Git pull from another repository

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 13:56:34
I have a repository called Generic , which is a generic application. I have forked it into a repository called Acme , which just builds upon the application stored Generic repository and adds Acme Co branding to it. If I make changes to the core functionality in Generic , I want to update the Acme repository with the latest changes I have made to the core functionality in Generic . How would I do that? As far as I can tell, I am essentially trying to merge the changes made in an upstream repository into the current fork. If it means anything, I'm trying to do this because I have a generic

Recommended DVCS mechanism for hosting many independent patches

空扰寡人 提交于 2019-12-02 05:32:46
问题 I have a project just getting started at http://sourceforge.net/projects/iotabuildit/ (more details at http://sourceforge.net/p/iotabuildit/wiki/Home/) that is currently using Mercurial for revision control. And it seems like Mercurial and SourceForge almost have all the right features or elements to put together the collaboration mechanism I have in mind for this project, but I think I'm not quite there yet. I want people to be able to submit, discuss and vote on individual changes from a