commit

View already-committed Git merge in external 3-way diff tool

空扰寡人 提交于 2019-12-03 05:35:32
问题 Is there any way to view a merge that has already been committed in a 3-way diff? If a huge merge between branches was committed 3 weeks ago, is there any way I can see a 3-way diff of it in an external diff-tool like BeyondCompare3? I'm looking for just the files changed in the merge commit . Bonus if I could get it to only show me the conflicts and anything manually changed, as opposed to seeing the entire difference of a file between the two branches. I wouldn't mind settling for a 2-way

How do you “rollback” last commit on Mercurial?

隐身守侯 提交于 2019-12-03 05:23:35
问题 I have a Mercurial repository that I use in local only... It's for my personal usage (so I don't "push" anywhere). I made a commit with 3 files, but after that I understood that I should do commit 4 files... Is there a way to "rollback" my last (latest, only one) commit, and "recommit" it with the correct files? (I don't know why, but my " Amend current revision " option is not active, so I can't use it...) 回答1: You just need this command: hg rollback See: http://hgbook.red-bean.com/read

How to make a git rebase and keep the commit timestamp?

房东的猫 提交于 2019-12-03 04:03:39
I want to make a rebase to remove a certain commit from my history. I know how to do that. However if I do it, the commit timestamp is set to the moment I completed the rebase. I want the commits to keep the timestamp. I saw the last answer here: https://stackoverflow.com/a/19522951/3995351 , however it didn't work. The last important command just showed a new line with > So I am opening a new question. The setup Let's say this is the history around the commit you want to remove ... o - o - o - o ... ... o ^ ^ ^ ^ | | +- next | | +- bad +-- master (HEAD) start where: bad is the commit you want

Can git commit “empty versions” of new, non-empty files?

你离开我真会死。 提交于 2019-12-03 03:05:10
Can git commit empty versions of some files? The case in point is that I need new (untracked), non-empty files to first be added and committed as empty files, so as to mark their contents as being new and to be reviewed (the full, untracked file should not be added to the index; git diff should show the newly added contents by comparing the file to its committed empty version). There is git add -N file… , which puts file with an empty content in the index, but this only says that file will be added , and git commit complains that the file has not been added. The thing is that the current, non

How to use the default git commit message after resolving merge conflicts?

佐手、 提交于 2019-12-03 02:55:46
问题 After doing a merge and resolving conflicts, is there an "easy" way to just accept the default generated commit message from the command line? One of our developers will resolve all the conflicts, and then do a git commit -m"Merge Commit" which replaces the generated commit message that listed all the conflict files. I would like to have a different flag that would just take the current file without modification. I know there is a -F or --file= option, but that requires knowing the file name

SVN commit error after deleting files locally

末鹿安然 提交于 2019-12-03 02:55:28
问题 I have a project that I am building with Netbeans 6.1 and I am using SVN. I deleted some files on the local machine then attempted to commit my changes to th SVN repository. The commit fails with the error message Entry for 'C:\path\to\project\myfile' has no URL Where myfile is the deleted file. Is there some way to tell SVN that the file was deleted from the project and that it should be deleted from the repository? 回答1: An svn update will bring the file back, fixing your local repo. You

Cannot Merge due to conflict with UserInterfaceState.xcuserstate

血红的双手。 提交于 2019-12-03 02:32:42
I created a branch and made a bunch of changes. I committed the changes and then archived the changes. Then I switched to the master branch and tried to do a merge. It said I had uncommitted changes. So I did a commit on the master branch to see what it was talking about. It said that there is a file called UserInterfaceState.xcuserstate that was modified. So I committed the change (not sure what the change was). Then I tried to merge again. It then opens up a merge window and indicates that there is a conflict with UserInterfaceState.xcuserstate. So I went back to the branch and found that

Github Commit Syntax to Link a Pull Request/ Issue

僤鯓⒐⒋嵵緔 提交于 2019-12-03 02:31:11
问题 I've seen commit messages that refer to a specific issue / pull request. What is the syntax to include a specific repository's issue or pull request? 回答1: Use the documented auto-linking format for issues across repositories. Syntax: {owner}/{repository}#{issue_number} Example: mojombo/jekyll#1 When such formatted text is present in a commit message, it's automatically transformed into a clickable link which will redirect one to https://github.com/{owner}/{repository}/issues/{issue_number}

Prevent direct commits on master branch in git repository and accept merges only?

一笑奈何 提交于 2019-12-03 02:06:51
My git repository has two branches, 'master' and 'dev'. Code committed to 'dev' goes through an automated build process before it is tested. Code that passes this is then merged into the 'master' branch. Is it possible, using hooks or something else, to prevent normal direct commits on the 'master' branch and only accept merges from 'dev' to 'master'? Not a direct answer: consider using repos instead of branches for this. Imagine three repos: local, dev, and blessed. Local = your own repo where you work. Dev = the repo you push all your commits to and the one that your build process is

Combine local Git commits into one commit for git-svn

梦想与她 提交于 2019-12-03 01:43:21
问题 Currently, when I run git svn dcommit git creates a separate commit in SVN for every local commit I've made since last syncing with SVN. Is there any way for dcommit to instead combine all my recent local commits into one commit for SVN? 回答1: git rebase remotes/trunk --interactive should bring you to the menu where you can pick commits or squash them all into 1 commit in order to avoid polluting your svn repository. This is a really good (but short) resource on working with git-svn. 回答2: No,