Re: [git-users] Problem in rebasing
1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. execute this git rebase -i HEAD~5 this will open vi(m) editor with something resembling below pick 3a3781e commit 5 pick d3838a4 commit 4 pick 51715bc commit 3 pick d97e543 commit 2 pick 9bf874ed commit 1 delete lines which you want to get rid of, save and exit. your job is done have courage to read documentation, asking question won't take you far. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[git-users] Problem in rebasing
Hello , I m working on a open source project and using git for this, but i m new in using git and unclear about the concept of rebasing. I have made many commits but now i need to do rebase and when i do rebase it says current branch is already updated. My work flow is like i clone a project from git and start working on its branch. 1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. How to do this .?? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Problem in rebasing
On Mon, 15 Jul 2013 04:17:36 -0700 (PDT) Amit Kumar amit3...@gmail.com wrote: [...] I have made many commits but now i need to do rebase and when i do rebase it says current branch is already updated. How exactly do you do rebasing? Looks you're trying to rebase onto an origin branch which were not updated since you forked your feature branch off it, so there's no need for rebasing. My work flow is like i clone a project from git and start working on its branch. 1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. You chose bad wording to it's not exactly clear what you really want to achieve. Do you want to prettify your development history (so that the *changes* commits 2 through 4 introduce are kept but there are no records of these separate commits in the history) or do you want to completely evaporate the changes they introduce and just transfer the changes made by the commits 1 and 5 from your development branch to some other branch? Or do you want to rebase your development branch onto some other branch (its origin branch may be) but keep only commits 1 and 5 as the result of rebasing? If yes, should the changes made by commits 2-4 be kept or not? Please be way more specific. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Problem in rebasing
I m working on the the branch ABC say and I want changes made by the commits 1 and 5 from ABC and remove the 2,3 4. On Monday, 15 July 2013 17:32:46 UTC+5:30, Konstantin Khomoutov wrote: On Mon, 15 Jul 2013 04:17:36 -0700 (PDT) Amit Kumar amit...@gmail.com javascript: wrote: [...] I have made many commits but now i need to do rebase and when i do rebase it says current branch is already updated. How exactly do you do rebasing? Looks you're trying to rebase onto an origin branch which were not updated since you forked your feature branch off it, so there's no need for rebasing. My work flow is like i clone a project from git and start working on its branch. 1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. You chose bad wording to it's not exactly clear what you really want to achieve. Do you want to prettify your development history (so that the *changes* commits 2 through 4 introduce are kept but there are no records of these separate commits in the history) or do you want to completely evaporate the changes they introduce and just transfer the changes made by the commits 1 and 5 from your development branch to some other branch? Or do you want to rebase your development branch onto some other branch (its origin branch may be) but keep only commits 1 and 5 as the result of rebasing? If yes, should the changes made by commits 2-4 be kept or not? Please be way more specific. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Problem in rebasing
sorry but i m new in git and very confused about the rebasing. I just just need to remove the middle commits and want to send only the **changes**made by the commit 1 and commit 5 only. Commit 1 commit 2--Commit 3 commit 4 Commit 5 but now i want only the Commit 1 - Commit 5 remove the changes made by commit 2 ,3 4 . i have removed the code of these commits from my clone repositories also. On Monday, 15 July 2013 17:39:43 UTC+5:30, Amit Kumar wrote: I m working on the the branch ABC say and I want changes made by the commits 1 and 5 from ABC and remove the 2,3 4. On Monday, 15 July 2013 17:32:46 UTC+5:30, Konstantin Khomoutov wrote: On Mon, 15 Jul 2013 04:17:36 -0700 (PDT) Amit Kumar amit...@gmail.com wrote: [...] I have made many commits but now i need to do rebase and when i do rebase it says current branch is already updated. How exactly do you do rebasing? Looks you're trying to rebase onto an origin branch which were not updated since you forked your feature branch off it, so there's no need for rebasing. My work flow is like i clone a project from git and start working on its branch. 1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. You chose bad wording to it's not exactly clear what you really want to achieve. Do you want to prettify your development history (so that the *changes* commits 2 through 4 introduce are kept but there are no records of these separate commits in the history) or do you want to completely evaporate the changes they introduce and just transfer the changes made by the commits 1 and 5 from your development branch to some other branch? Or do you want to rebase your development branch onto some other branch (its origin branch may be) but keep only commits 1 and 5 as the result of rebasing? If yes, should the changes made by commits 2-4 be kept or not? Please be way more specific. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Problem in rebasing
On Mon, 15 Jul 2013 05:09:43 -0700 (PDT) Amit Kumar amit3...@gmail.com wrote: A. Because it breaks the discussion flow. Q. Why top-posting sucks? I m working on the the branch ABC say and I want changes made by the commits 1 and 5 from ABC and remove the 2,3 4. Then do interactive rebasing. Say, if your branch ABC was forked off branch master, do $ git checkout ABC $ git rebase -i master At this point Git will create a so-called rebase script for you and open it in your preferred text editor. This script will contain one entry for each of your five commits made at ABC on top of master. Now just delete from it the entries for commits 2-4, save and quit the editor -- git will pick just the first and the last commits while rebasing, exactly as you will have specified in the rebase script. [...] -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.