Looking for a simple (automated) Hg-like workflow

I asked here a basic question, but it wasn’t answered:


Hey @zoharl3,

Thanks for being here! The link to stack is null now, would you mind sharing what you are trying to accomplish, perhaps then we can help point you on the right direction.

Copying the link content:

There’s a repository that is updated from 3 places:

  • a home computer

  • a work computer

  • a friend

I’m used to save (backup) my code changes often (every hour), and I also use the repository to sync between my computers (I’m just running a script).

In Hg, it’s simple, and there were no problems so far:

hg commit -R %s -m "." -v

hg fetch -R %s -v

hg push -R %s

where %s stands for the harddrive directory.

In git, I’m doing:

git -C %s commit -a -m "." -v

git -C %s pull -v

git -C %s push

However, it seems to have issues:

  • Files that I didn’t touch are merged and reported as me changing them.

  • Sometimes, line endings are changed, and white spaces are added.

  • Sometimes, something fails, e.g. commit isn’t done, not sure what, I’m not keeping a log, but it seems like this workflow is unreliable.

What’s the suggested foolproof, hands off workflow for git?

If line endings are changing, then it sounds like something isn’t configured properly. And if that assumption is correct, then it may be causing some or all of the other problems. You may want to consult our help documentation on dealing with line endings in git.

If that doesn’t fix it, then if you can give us some steps to reproduce the problem, we can take a deeper look. Please include:

  • A starting state (preferably a commit in a public repository)
  • The exact steps you took
  • What you expected to happen
  • What actually happened


This sounds like a promising direction to look into and a fair request (to reproduce the problem). Since it may take me some time to look into it, I’m accepting this as the solution for now.

You also confirmed that my pipeline should work fine in general.


1 Like

I think I found the issue: my TortoiseGit was configured to use cygwin git instead of PortableGit. The former has issues with line endings and reports everything as modified. GUI clients actually warn against using cygwin git.

1 Like