commit

Rollback multiple commits (before Pushed to public) in Mercurial

对着背影说爱祢 提交于 2019-12-03 11:03:06
I am aware that rollbacks can remove commits from the latest changeset in a local repository. However, is it possible to remove all the latest commits since the previous push without having to re-clone the share repository? You could make a new repo with hg clone : hg clone -r last_good_changeset localrepo newlocalrepo You can use the hg strip command, part of the mq extension: hg strip REV This will remove that revision + all its descendants. Before you try this, make a copy/clone of the repository to experiment in. If you are using mercurial eclipse, you can rollback once, then shelve those

Stored Procedure Transaction

老子叫甜甜 提交于 2019-12-03 09:44:44
问题 I have never used a Transaction, Commit and Rollback before and now I need to use one. I have checked around online, etc for examples to make sure that I am in fact using this correctly but I am still not sure if I have coded this correct. I am hoping someone can review and advise me if this seems correct. Basically I have 2 databases for an application. One is an archive - meaning data that is no longer going to be manipulated by the users will be moved to this DB. But in the event they ever

Should I commit cosmetic changes?

寵の児 提交于 2019-12-03 09:24:58
There are minor coding style changes that I often want to commit to the source control, but now the change log is full of those changes that do not affect code functionality. What should I do next time I have to fix minor things like: Remove and sort usings (in .NET, imports in python, includes in c++) Correct indentation, spacing and line breaks If you are changing the code file, I don't really see why you wouldn't want to commit and share those changes. If you don't you run the risk that someone else will fix them and then collide with yours. If they aren't changes that other users want in

How to delete commits from git on Github and Bitbucket

余生长醉 提交于 2019-12-03 08:54:06
问题 I accidentally pushed up files from my .idea directory in my Django project which I had in my .gitignore file. I am trying to completely delete the commit from my bitbucket repository since there is someone else Im working with on the project and he can't pull my changes without affecting his own .idea files. I have seen other SO questions where they say to use git revert, however I remember there was another command where you pushed the last good commit you made, and everything after that

How can I fix a reverted git commit?

南笙酒味 提交于 2019-12-03 08:08:17
问题 I've committed a bunch of changes to a repository, and they were reverted by someone else (they compile on windows but not on linux). I think that the changes are still in the history, but how can I get those changes back, fix them, and then resubmit? 回答1: Have you tried reverting the revert? They reverted your commit using git revert <your commit id> The revert itself is a commit and has its own commit id. So now you need to do git revert <the commit id of his revert-commit> 回答2: You can try

What git commit practice is better?

空扰寡人 提交于 2019-12-03 07:27:06
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 new patch into the thematic branch. I won't change the remote repository’s history. But today, I was

What is “UserInterfaceState.xcuserstate” file in Xcode project?

妖精的绣舞 提交于 2019-12-03 06:29:07
问题 I use svnX. When importing project, I check "no ignore" option. (for importing libOAuth.a, ...) But one file is causing a small problem. UserInterfaceState.xcuserstate What is this file? Can I ignore this file? Is it important? Should I commit this file? 回答1: What is this file? You can open it in property list editor and have a look -- It stores things like your workspace/project document layouts, nothing you would lose sleep over if lost. Can I ignore this file? You would ignore it in all

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

谁说我不能喝 提交于 2019-12-03 05:59:36
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. 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 resolved merge in your work tree otherwise. First, before you go to any trouble, note that you could simply create

How to move commits to another branch?

浪子不回头ぞ 提交于 2019-12-03 05:42:36
I'd like to move my last few commits from master into a branch of their own. The tree on my PC looks like that: W (some branch) / X1--X2--X3--X4--Y--Z1--Z2 (master) I'd like it to look like: W (some branch) / X1--X2--X3--X4 (master) \ Y--Z1--Z2 (my new branch) However, the tree at GitHub looks like: W (some branch) / X1--X2--X3--X4--Y (master) That's what I saw as a solution for moving the last commits to another branch: git checkout master git branch my_new_branch git reset <commit_id> My question is: would I be able to successfully push to GitHub after moving the commits into a new branch

How do I list just the files that would be committed?

六月ゝ 毕业季﹏ 提交于 2019-12-03 05:39:55
问题 Is there any way to get a list of files that will be committed when I type the following? git commit -m "my changes" git status lists too much. I could strip out all the words, but I'd rather not. And I don't want to be told about untracked files. I've tried git ls-files -md but that doesn't show files that have been recently added, but not yet committed. I'm looking for the same output you'd get from svn status -q For example $ svn status -q A file.py M dir/database.py M start.py 回答1: This