Git pull from another repository

Issue the following command in your Acme repo. It adds a new remote repository named upstream that points to the Generic repo. git remote add upstream https://location/of/generic.git You can then merge any changes made to Generic into the current branch in Acme with the following command: git pull upstream If you just want it to … Read more

Merging: Hg/Git vs. SVN

I too have been looking for a case where, say, Subversion fails to merge a branch and Mercurial (and Git, Bazaar, …) does the right thing. The SVN Book describes how renamed files are merged incorrectly. This applies to Subversion 1.5, 1.6, 1.7, and 1.8! I have tried to recreate the situation below: cd /tmp … Read more

How can I see incoming commits in git? [duplicate]

incoming isn’t quite a direct mapping in git because you can (and I often do) have multiple repos you’re pulling from, and each repo has multiple branches. If there were an equivalent of hg’s incoming command, it’d probably be this: git fetch && git log ..origin/master That is, “go grab all of the stuff from … Read more

Git interoperability with a Mercurial Repository

There’s a new git-remote-hg that provides native support: Bridge support in Git for Mercurial and Bazaar Just copy git-remote-hg to your $PATH, make it executable, and that’s it, no dependencies (other than Mercurial): git clone hg::https://www.mercurial-scm.org/repo/hg/ You should be able to push and pull from it as if it was a native Git repository. When … Read more

Hg: How to do a rebase like git’s rebase

VonC has the answer you’re looking for, the Rebase Extension. It is, however, worth spending a second or two thinking about why neither mq nor rebase are enabled by default in mercurial: because mercurial is all about indelible changesets. When I work in the manner you’re describing, which is nearly daily, here’s the pattern I … Read more

Mercurial: Can I rename a branch?

Update to the stiging branch and create a new branch off of it. Then close the old branch. In summary: hg update stiging hg branch staging hg commit -m”Changing stiging branch to staging.” hg update stiging hg commit –close-branch -m”This was a typo; use staging instead.” hg push –new-branch

Mercurial — revert back to old version and continue from there

Here’s the cheat sheet on the commands: hg update changes your working copy parent revision and also changes the file content to match this new parent revision. This means that new commits will carry on from the revision you update to. hg revert changes the file content only and leaves the working copy parent revision … Read more

What’s the best three-way merge tool? [closed]

KDiff3 open source, cross platform Same interface for Linux and Windows, very smart algorithm for solving conflicts, regular expressions for automatically solving conflicts, integrate with ClearCase, SVN, Git, MS Visual Studio, editable merged file, compare directories Its keyboard-navigation is great: ctrl-arrows to navigate the diffs, ctrl-1, 2, 3 to do the merging. Also, see https://stackoverflow.com/a/2434482/42473

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)