Tag: mercurial

Mercurial branching and merging without having to push branch

Here is what I’m trying to do: hg clone http://www.my_repo.com hg branch new_branch hg update new_branch # move to new branch do some changes in branch code hg commit -m ‘changes in branch new_branch’ hg update default # move back to default branch hg merge new_branch # merge new_branch into default to have changes added […]

Feature branches in mercurial

I noticed a problem: In Mercurial bookmarks are intended to be used for feature-branches and be the equivalent of branches in Git. But In Git revision is always has an information about to which branch it belongs. So in Git we are always can say when work on feature is started and when – finished. […]

Is it possible to remove old commits in Git without losing data?

This question already has an answer here: Remove an old Git commit from a branch without using a reverse patch? [duplicate] 2 answers

git submodule add failed with bitbucket repo

I’m trying to add a repo as a submodule for my project as it will depend on it. The project is hosted on bitbucket, and when I tried to add it using this: git submodule add https://bitbucket.org/blueluna/transmissionrpc, I got the following: Cloning into ‘transmissionrpc’… fatal: repository ‘https://bitbucket.org/blueluna/transmissionrpc/’ not found Clone of ‘https://bitbucket.org/blueluna/transmissionrpc’ into submodule path […]

How to do the equivalent of git checkout <commit> in mercurial with subrepositories?

According to Mercurial GitConcepts the equivalent of git reset –hard is hg revert -a –no-backup. After doing that I expect the equivalent of git checkout <commit> which is hg update -c <cset> to work. However it fails with error abort: uncommitted changes in subrepository ‘subrepo/subsubrepo’ even after running hg revert -a –no-backup in subrepo/subsubrepo and […]

Is there an hg equivalent to git-info?

I have git-info which is part of git-extras. I am actually looking to know the remote repository URL – ┌─[shirish@debian] – [~/games/libcpuid] – [10328] └─[$] git-info ## Remote URLs: origin https://github.com/anrieff/libcpuid (fetch) origin https://github.com/anrieff/libcpuid (push) ## Remote Branches: origin/HEAD -> origin/master origin/master ## Local Branches: * master ## Most Recent Commit: commit fa87a5e183a3809ded89ecb3efde4e94837c5736 Author: Veselin […]

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 […]

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