dvcs

Git tool to remove lines from staging if they consist only of changes in whitespace

非 Y 不嫁゛ 提交于 2019-12-03 02:49:05
The point in removing trailing whitespace is that if everyone does it always then you end up with a diff that is minimal, ie. it consists only of code changes and not whitespace changes. However when working with other people who do not practice this, removing all trailing whitespace with your editor or a pre-commit hook results in an even worse diff. You are doing the opposite of your intention. So I am asking here if there is a tool that I can run manually before I commit that unstages lines from staging that are only changes in whitespace. Also a bonus would be to change the staged line to

Automatically mirror a git repository

只谈情不闲聊 提交于 2019-12-03 02:22:02
问题 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? 回答1: I wrote a post-commit hook for just this purpose. The hook itself is simple; just add a file named

Git remove directory

六眼飞鱼酱① 提交于 2019-12-03 02:02:37
I've got a repository on GitHub ( http://github.com/hrickards/PHP-Crypto ) for a little project me and a couple of others are working on. My development environment is Aptana Studio, and I use the EGit plugin as Aptana is basically Eclipse underneath. Today the designer sent the HTML and CSS for the website with the images in a folder named img. Previously the images were in a folder called images. Thinking nothing of it and being too lazy to update the CSS and HTML, I simply kept the images in the img directory and commited to Git. However, the GitHub web interface shows both the img and

Is a DVCS useful for one developer?

寵の児 提交于 2019-12-03 01:52:32
Or would a conventional client-server VCS be more appropriate? I'm currently using TortoiseSVN, but I'm interested in a DVCS, but I'm not sure if it's even a good idea to try to use something like that solo. Since you can still push to another machine also running Git/Mercurial/Bzr/etc you still have the multi-computer backup safety, which you'd hopefully have either way. However if you ever code while traveling, having full repository access can be a huge plus, then just resync to your server when you have a net connection again/get home/etc. Yes. A DVCS is, in my opinion, even better suited

Comparing the pros and cons of Bitbucket to Github [closed]

与世无争的帅哥 提交于 2019-12-03 00:57:07
Closed . This question is opinion-based. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Disclaimer: This is a subjective question. Please follow relevant guidelines. I am considering the migration of source code from a traditional VCS to a DVCS . Since having a decent GUI web-based frontend and workflow tools are a must, the two obvious candidates are Bitbucket and Github . Unfortunately I have no in-depth experience with either of them, so I'd really like to have a few

What do people think of the fossil DVCS? [closed]

喜夏-厌秋 提交于 2019-12-03 00:04:28
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . fossil http://www.fossil-scm.org I found this recently and have started using it for my home projects. I want to hear what other

Submitting Hg changes back to SVN

送分小仙女□ 提交于 2019-12-02 20:44:52
I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with hg clone . Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and we occasionally pushed the changes, and hence I had to pull them. hgsubversion does some nasty things to changesets, such as changing their committer (and I believe even the hash). When I tried pushing and pulling to the BitBucket repo, I had to do a merge. Now I am unable to push changes back into the Subversion repository due to our beloved

How do I synchronise two remote Git repositories?

China☆狼群 提交于 2019-12-02 20:38:03
I have two repository urls, and I want to synchronise them such that they both contain the same thing. In Mercurial, what I'm trying to do would be: hg pull {repo1} hg pull {repo2} hg push -f {repo1} hg push -f {repo2} This will result in two heads in both repos (I know it's not common to have two heads, but I'm doing this for synchornisation and it needs to be non-interactive. The heads will be merged manually from one of the repos and then the sync run again). I'd like to do the same thing in Git. Eg., with no user interaction, get all of the changes into both repos, with multiple branches

Showing renames in hg status?

落爺英雄遲暮 提交于 2019-12-02 20:19:50
I know that Mercurial can track renames of files, but how do I get it to show me renames instead of adds/removes when I do hg status ? For instance, instead of: A bin/extract-csv-column.pl A bin/find-mirna-binding.pl A bin/xls2csv-separate-sheets.pl A lib/Text/CSV/Euclid.pm R src/extract-csv-column.pl R src/find-mirna-binding.pl R src/modules/Text/CSV/Euclid.pm R src/xls2csv-separate-sheets.pl I want some indication that four files have been moved. I think I read somewhere that the output is like this to preserve backward-compatibility with something-or-other, but I'm not worried about that.

bitbucket, “hg push” and “hg update”

那年仲夏 提交于 2019-12-02 19:18:06
If I start out with a local mercurial repo, which I consider to be the "main" repo (pardon me my dvcs lords), and intend to use bitbucket as a backup and issue tracking facility, I can do all my changes in my local repo and do an "hg push" to send the changes back to bitbucket. Don't I need to follow this "hg push" command run on my local machine with an "hg update"? Why do you care what's in the working directory on BitBucket's servers? As long as you push the changes will be in the repository and visible on the BitBucket page. EDIT: OK, I'm going to edit this to be a useful answer. Say you