Tag: mercurial

What's the git equivalent of hg commit -u?

I’m logged in on a shared account and want to commit some change quickly under my own identity. With Mercurial I would do it with the -u flag -u –user USER record the specified user as committer hg commit -u ‘john.doe@example.com’ I tried git commit –author=’John Doe <john.doe@example.com>’ but doesn’t help. Since the account is […]

If I have a folder with many code snippet folders, how to avoid Git or Mercurial from committing source code in another folder?

If I have a folder such as: code/try_closure code/try_http_send […] I can create a repository at the code folder, but then if I commit at the try_http_send folder: hg commit -m “good version” <— git should be similar then, I can accidentally commit other code changes in all other folders under code. Alternatively, I can […]

Is there an equivalent of git-walk next / git-walk prev in hg?

I read that git-walk next / git-walk prev will allow you to move through changesets committed linearly so that you can play them back in a presentational setting within your local working copy. Does hg have any equivalent commands? (And of course I don’t mean the typical -r arguments selecting revisions, I mean moving through […]

hg convert abort: '\n' and '\r' disallowed in filenames:

I’m about to convert my git repo into a hg repo. The problem is that a few months ago there was a file added named ‘favicons/Icon\r’ to the git repo, which is fine for git. The file has been deleted, but since it is in the history I get this output when running the hg […]

How can I work in my repo using Git, and push to a Mercurial repo?

I installed hg-git, and I clone my github repository using it: $ hg clone git+ssh://git@github.com/my/repo.git $ git status fatal: This operation must be run in a work tree $ hg gexport ( now the .git is created ) $ git status fatal: This operation must be run in a work tree I can access the […]

Perforce: how to track file “deployments”

We are a very small team using Oracle Forms / Reports as development tools, and we’re using no version control at the moment. We are considering using Perforce as our version control software. Our current policy is any developer in the team can make changes to any source file, then deploy (manually copy) the generated […]

Work on one commit while browsing another (Git/Mercurial)

Say I have a huge Git/Mercurial repository with commit/changeset A and B. Now say that there are two non overlapping sets of files, say set dir1 and set dir2. Set dir1 exists in commit/changeset A, and may exist in B, and vice versa (set dir2 exists in commit/changeset B, and may exist in A). For […]

How can I alert developers they need to run certain commands after they pull my commit (in version control/git)?

Here’s a common scenario: You’re working on a project (such as, but not necessarily, a web app) with other developers. I decide we should use a certain open-sourced tool and add it to the project dependencies. Of course, I add it to our package manager, which is in source control. or Tom realizes we can […]

How to unstage changes but keep tracking a file in Mercurial?

For example, I have 2 files: A and B Both of them are tracked and modified then. What I want to do is to commit one file at one time. In git, I can do it like this: git add A git commit -m “add A” git add B git commit -m “add B” But […]

git equivalent to hg -R?

What is the git equivalent to hg -R? I want to operate on a repository that isn’t rooted in a parent directory of the current working directory. So far I have git –git-dir=”$a/.git” –work-tree=”$a” diff “$a”, where $a is the git repository directory.

Git Baby is a git and github fan, let's start git clone.