commit

Perform an empty commit with mercurial

ⅰ亾dé卋堺 提交于 2019-11-30 17:33:07
With with Mercurial queues extension, I can make an empty commit with some commit message like so: hg qnew patch_name -m "message" Is there a way to do this without Mercurial queues? I tried simply: hg commit -m "message" but hg just says "nothing changed" and doesn't do the commit, and I don't see any "force" option that would override that. If you're wondering about my motivation for doing this: we have testing infrastructure where you push to a special repository and it will trigger automated tests to run. You need to put a special string into the commit message of the tipmost commit that

Referring to the previous/next commit in git?

旧城冷巷雨未停 提交于 2019-11-30 17:21:03
I have seen git commands use a syntax such as HEAD~ , but I haven't been able to find this syntax in the Git Reference Manual . Here is what I have understood: <commit>~<n> refers to the commit <n> steps earlier than <commit> (where <n> is an integer number), and commit~ simply means the same and that <n> implicitly is one. Now, is this correct? In that case, does this always work? What if <commit> is the result of a merge between two branches, which commit will then <commit>~ refer to? Is there some corresponding syntax for referring to the next commit or the commit <n> steps later? cexbrayat

Commit file from Jenkins workspace to SVN

为君一笑 提交于 2019-11-30 16:51:48
问题 I have a saved project in Subversion repository and compiles it with Jenkins. When I run the build, Jenkins pulls project into workspace directory. I need commit one changed file from Jenkins workspace into Subversion. How can I do it?? Thanks for answers... 回答1: Can you give a few more details? Exactly what is this file, and why does it need to be committed as part of your Jenkins build? What are you building (Java? C++? .NET?) and how are you building it? Normally, you shouldn't put

Remove an unreferenced commit from git repository

落花浮王杯 提交于 2019-11-30 15:31:35
问题 I have a git commit history like this: U / A---B---C---D---E master Nothing points to the commit U , but I know its hash. How can I completely remove this commit from my repository as if it never existed? I'm the only person using this repo. I tried using git rebase , but that can either delete parts of a branch or move commits, but doesn't seem to be able to delete a single commit. If I do git checkout <hash> and then git reset --hard HEAD~1 I don't see the the commit anymore. Is it actually

Git: Can I commit my working directory to a new branch without committing it to a current branch?

房东的猫 提交于 2019-11-30 14:40:31
问题 I am working on a project, and had all of my tests passing on the master branch. I then made some changes, and when everything started failing, I realized that maybe I should have made those changes on a different branch. Is there a way I can commit the changes to a new branch without committing them to my master branch, so that the master still has my passing tests? 回答1: Yes, just create the new branch and check it out: $ git checkout -b new-branch Then commit any changes you have. They'll

The working copy '<Project Name>' failed to commit files - Couldnt communicate with helper application

假如想象 提交于 2019-11-30 13:08:44
问题 I've just updated to Xcode 7 general release and ive tried committing files. Its failing however, and im getting the following message; Ive seen this question but the secondary response is different in the OP question: Xcode and Git Source Control : “The working copy XXXXX failed to commit files” Whats the 'helper application' that it is looking for and whats the solution? Migrating to Xcode 7 and iOS9 is becoming a headache :( I commit my files by going to 'Source Control' -> 'Commit' 回答1:

GIT: commit changes to old/safe branch while in new/dirty/dev branch without checking out or losing unstaged data

有些话、适合烂在心里 提交于 2019-11-30 12:12:40
I created a new Branch before I started dev on something experimental. I usually forget that (which isn't a problem), but now I did it beforehand. Since then I have updated 3 files. In 2 are only experimental changes that I DON'T want committed to the safe branch. In 1 are only safe (minor) changes that I definitely DO want committed to the safe branch. I'm fine with these last changes to be committed to the new branch as well (but rather not). Is it possible - I'm sure it is - to (quickly) commit a few unstaged, uncommitted changes from my (dirty) working dir to an old, safe branch? The only

Django: Difference between save() and create() from transaction perspective

社会主义新天地 提交于 2019-11-30 12:09:46
问题 The create() method in Django creates a model instance then calls save(), which is said to trigger commit. So there should not be any difference in triggering transaction's commit. But in reality, executing a method that creates a bunch of model instances using create() on Postgresql I am getting transaction aborted, commands ignored until end of transaction exception. The method runs fine with non-transactional db backends. Also, when I replace the create()s with: m = Model(attr1=..., attr2=

Add existing project to BitBucket using Xcode

三世轮回 提交于 2019-11-30 11:37:12
问题 I keep getting an error when I try to commit my project files using Xcode. File -> Source Control -> Commit "The operation could not be performed because no valid working copies were found." "Please verify that your files are under source control and try again." This is an existing project that is NOT under source control. How do I get my project files under source control, using Xcode? EDIT: Answered my own question. Step 1) Restart Xcode Step 2) Choose connect to repo Step 3) Enter repo

Git: Can I commit my working directory to a new branch without committing it to a current branch?

六月ゝ 毕业季﹏ 提交于 2019-11-30 11:17:52
I am working on a project, and had all of my tests passing on the master branch. I then made some changes, and when everything started failing, I realized that maybe I should have made those changes on a different branch. Is there a way I can commit the changes to a new branch without committing them to my master branch, so that the master still has my passing tests? Yes, just create the new branch and check it out: $ git checkout -b new-branch Then commit any changes you have. They'll be applied to the new, checked-out branch. You can stash your current changes (git stash), switch to the new