|
I copied a file and made a bunch of changes to it at the same time (i.e. in one commit). I then carried on making changes in subsequent commits. I now want to split that commit into two - one that just copies the file to its new location and one that ...
Started by Ben Hymers on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This can be used to split a commit into two:
Start an interactive rebase with git rebase -i < commit>^, where <....
Indeed, you can undo the commit, or you can add other commits.
Of this edit to be exactly one commit.
|
|
How do you squash your entire repository down to the first commit?
I can rebase to the first commit, but that would leave me with 2 commits. Is there a way to reference the commit before the first one?
Started by vigilant on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to keep all the commit messages you could first do git log > original.log and then edit that for your initial commit....
Last 2 commits manually with something like this:
git reset HEAD~1 git add -A git commit --amend.
|
|
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?
Started by MacRae Linton on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is a really good # create a temporary tag git reset --hard trunk git merge --squash local git commit # write your single commit message here git....
Or squash them all into 1 commit in order to avoid polluting your svn repository.
|
Ask your Facebook Friends
|
Is it possible to group a number of commited files together (as a single commit) after you've already committed them to the repository in Svn?
It seems I always forget a file or two after I've committed a bunch them (when not using subeclipse) and I was...
Started by leeand00 on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you could add files to a commit afterwards, then a person who checked-out r123 should I do if I commit code that....
This way r123 always refers to the same thing.
Once you make a commit, there is intentionally no way to modify it.
|
|
I accidentally amended my previous commit. The commit should have been separate to keep history of the changes I made to a particular file.
Is there a way to undo that last commit? If I do something like git reset --hard HEAD^, the first commit also is...
Started by Jesper Rønn-Jensen on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
In fact, any commit range will do, as long as it contains that commit....
You can always split a commit, From the manual
Start an interactive rebase with git rebase -i commit^, where commit is the commit you want to split.
|
|
Our repository has a structure like this:
Dev Project1 source docs ... Project2 source docs ... ...
After we commit changes to Project1 sources we would like to deploy Project1 (compile, test, copy, etc.). How to find out in post-commit-hook that we commited...
Started by Sazug on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
SVN will provide REPOPATH for building/deploying, as svn will wait until post-commit hook has finished(so you will not see "Committed like CruiseControl.NET over....
You should use
svnlook changed -r REV REPOPATH
in a post-commit hook.
|
|
Hi,
I have successfully implemented the post-commit email notification for the post-commit hook. Now I'm looking at a bigger problem, I don't want the hook to send email for every commit. Is there a way to use the hook to maybe write the content of the...
Started by Oded on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
First you have to decide when you actually want to send the email:
Every tenth commit? At midnight it:
in the post-commit hook: only send an email when revision number % 10 == 0 create a cron job in the post-commit hook: detect when....
|
|
Is it possible to use the commit message in a pre-commit hook in CVS? The CVS server is running remotely, and I access it using pserver .
Ideally, I want to allow the commit if the files pass the filter or the commit message contains certain text.
I don...
Started by dreamlax on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Both can be used to cancel the commit (the programs just need to exit.
You can reject the commit by returning non-zero will let you verify the message.
Which can verify the contents of the checkin comment.
|
|
Is there a way to edit the commit message of a certain revision in Subversion? I accidentally wrote a wrong filename in my commit message which could be confusing later.
I've seen How do I edit an incorrect commit message in git but the solution to that...
Started by jeremy Ruten on
, 8 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
See this part of the Subversion FAQ
svnadmin setlog /path/to/repository -r revision_number --bypass-hooks message_file.txt
Check the Subversion FAQ:
How do I change the log message for a revision after it's been committed?
If your repository....
|
|
We would like to implement a policy that will force developers to commit only changes that will compile.
Is there a way to do such thing using pre-commit hook? If not, I'll be happy to hear any recommendation or workaround that will maintain the source...
Started by ofer on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The pre-commit would also have to wait for the build result before rejecting or....
Having the pre-commit hook kick off a build would be complicated, because the repository does but there is no easy svnlook export command to do a full build.
|