commit

What git commit practice is better?

China☆狼群 提交于 2019-12-03 17:50:02
问题 I truly believe that to have one commit on one issue is a good practice. I'm sure I read it somewhere in an article like “Best practices”. As such, my workflow has been the following: For a new issue, I create a new local branch with git checkout -b new-issue . Commit all changes into it. Sometimes this involves lots of commits. When done, I squash the commits and rebase them into current thematic branch. If something goes wrong, I can git revert the commit, find the bug, fix it, and commit

How to commit a long Git merge in the middle of resolving conflicts

自作多情 提交于 2019-12-03 16:56:26
问题 I have a big merge going on with over 300 conflicting files. I want to resolve these using mergetool, but there's no way I'm going to finish it all in one sitting. How can I commit the merge and then come back later and continue the same merge? Normally it seems git doesn't allow you to commit if there are conflicts in the index. 回答1: I'm assuming by "can't do it in one sitting" you actually mean "want to do some other things before I finish" - since you could just leave the partially

Git - Do colours mean something in vi when I commit?

旧巷老猫 提交于 2019-12-03 14:41:32
问题 I'm using Git Bash on Windows and, when I run git commit , the vi editor opens to allow me writing a Commit note. I noticed that the first row of the text I write is yellow (although not all of it, only the first 30 or 40 characters), the second is white on a red background and from the 3rd onwards they are gray. Does this colour coding mean anything, or is it just some sort of weird glitch? I come from an SVN background, where Commit comment was pure text and I wasn't expecting this "rainbow

How do I only commit specific lines using SmartGit/Hg

回眸只為那壹抹淺笑 提交于 2019-12-03 12:36:44
问题 I'm using SmartGit/Hg. I edited some files working on two separate new features. Now as I finished working on Feature A , I want to commit my work, but I can't just commit all my edited files, as they contain changes of Feature B , which I do not want to commit just now. 回答1: You can achieve that using the stage command. First of all, stage all the files containing changes to be committed. In this example, all the files except the one called DoNotCommit.php contain at least one line we want

Cannot Commit to the SVN - CHECKOUT can only be performed on a version resource [at this time]

↘锁芯ラ 提交于 2019-12-03 12:14:30
I am trying to commit some classes and XML files to SVN but I keep getting this error message: svn: E200007: Commit failed (details follow): svn: E200007: CHECKOUT can only be performed on a version resource [at this time]. svn: E175002: CHECKOUT request failed on '/svn/SriLankaLottery-app/!svn/rvr/31/trunk/DealsDirect/src/com/elottery/Login.java' I also tried to update the code and then commit, but it still does not work. Have a clean up and see, normally it works. right click on the project -> team -> cleanup / refresh For those that project -> team -> cleanup doesn't work in eclipse try:

Cannot Merge due to conflict with UserInterfaceState.xcuserstate

为君一笑 提交于 2019-12-03 11:58:52
问题 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

How commit all files except one with SVN

无人久伴 提交于 2019-12-03 11:53:04
问题 I want to commit all modified files except one using Subversion. So here is the scenario: $ svn st M file1 M file2 M file3 M file4 I can do something like this: svn ci -m "Commit 1" file1 file2 file3 svn ci -m "Commit 2" file4 But when a large number of files, I'm trying to simplify my work: svn ci -m "Commit 1" `svn st | awk '{print $2}' | grep -v file4` svn ci -m "Commit 2" file4 This solution is very fragile, because this scenario not works: $ svn st M file1 M file2 D file3 A + file4 I

Python/SQLite3: cannot commit - no transaction is active

核能气质少年 提交于 2019-12-03 11:20:00
I'm trying to code a book indexer using Python (traditional, 2.7) and SQLite (3). The code boils down to this sequence of SQL statements: 'select count(*) from tag_dict' () /* [(30,)] */ 'select count(*) from file_meta' () /* [(63613,)] */ 'begin transaction' () 'select id from archive where name=?' ('158326-158457.zip',) /* [(20,)] */ 'select id from file where name=? and archive=?' ('158328.fb2', 20) /* [(122707,)] */ 'delete from file_meta where file=?' (122707,) 'commit transaction' () # error: cannot commit - no transaction is active The isolation level is 'DEFERRED' ('EXCLUSIVE' is no

How to compose git log for pending changes in TeamCIty

こ雲淡風輕ζ 提交于 2019-12-03 11:17:13
I have a TeamCity agent configured to build my XCode projects and I use github. I would like to automatically include in my release notes the descriptions from all pending commits in TeamCity. How can I fetch them from github and store them in teamcity? Once I put them in a teamcity variable I can easily add them to my build script. VonC You could use the " Adding or Changing a Build Parameter from a Build Step " feature in order to update some build parameters right from a build step. You would need a step which would call git log origin/master..master (see " git: list commits not pushed to

restore - git reset --hard HEAD^

断了今生、忘了曾经 提交于 2019-12-03 11:05:32
Unfortunately I did several times git reset --hard HEAD^ losing a quite big chunk of code in several files. Is there a way to restore those commits or in this case to forward where the HEAD was before, so I can bring up those lines that I lost? Use the reflog to recover the sha1 of the previous HEAD. In particular, the article reflog, your safety net will be particularly relevant to you. From that article: The most common usage of this command is that you’ve just done a git reset and moved your HEAD back a few commits. But oops, you need that bit of code you left in the second commit. Crap.