Hi, Excuse me for going a bit off-topic. I'd like to contribute some changes, but being new to git, I'm unsure how to progress. I've forked the quantlib repo, and cloned it. I've created a new branch to work on. Everything is still clean. Now, I first have to modify my .vcxproj files to point to my own boost installation. Obviously these are changes that I don't want to include in the pull request later. After adding boost and checking that it compiles correctly, I do a commit.
Now I'm ready to start with the actual work. Let's assume I've finished that and do another commit. How do I proceed now? I want to create a pull request, but I don't know how to exclude the original, irrelevant commits. Is this easily possible? Should I use git rebase or have used multiple branches? I also posed this question on http://stackoverflow.com/questions/23781928/git-ignore-first-few-changes
Once I figure this out, I want to apply a similar technique to pull in the outstanding commits from Peter's changes (to let the QuantlibAddin build successfully) and then do some work to expose more functions for the AddIn. Yet again, I'll have to create a pull request, but I want to exclude Peter's changes, because those are already in a pull request.
Sorry for the newbie questions, but I hope you'll appreciate the contributions that I can make.
regards Francois Botha
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
It is a very interesting question. It may not be pratical, however, if you use different versions of boost, for example, for different projects (I had this at work). I have the same problem in other project and some of my contributions were not accepted although the final code was exactly what it was supposed to be. _____________________ Piter Dias From: [hidden email] Date: Wed, 21 May 2014 14:24:58 +0200 To: [hidden email] Subject: [Quantlib-dev] Some off-topic help on git Hi, Excuse me for going a bit off-topic. I'd like to contribute some changes, but being new to git, I'm unsure how to progress. I've forked the quantlib repo, and cloned it. I've created a new branch to work on. Everything is still clean. Now, I first have to modify my .vcxproj files to point to my own boost installation. Obviously these are changes that I don't want to include in the pull request later. After adding boost and checking that it compiles correctly, I do a commit.
Now I'm ready to start with the actual work. Let's assume I've finished that and do another commit. How do I proceed now? I want to create a pull request, but I don't know how to exclude the original, irrelevant commits. Is this easily possible? Should I use git rebase or have used multiple branches? I also posed this question on http://stackoverflow.com/questions/23781928/git-ignore-first-few-changes
Once I figure this out, I want to apply a similar technique to pull in the outstanding commits from Peter's changes (to let the QuantlibAddin build successfully) and then do some work to expose more functions for the AddIn. Yet again, I'll have to create a pull request, but I want to exclude Peter's changes, because those are already in a pull request.
Sorry for the newbie questions, but I hope you'll appreciate the contributions that I can make.
regards Francois Botha
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
git rebase --interactive is probably what you want once you've committed the project file changes, as mentioned in the Stack Overflow post. I'd imagine most of the time you could get away with just not committing the project files at all, unless you're adding files to the project, in which case you can just commit those specific lines. If anybody is interested in learning more about git's commit and branching model, and the commands git provides, I recommend the following interactive tutorial: http://pcottle.github.io/learnGitBranching/?demo
On Wed, May 21, 2014 at 6:01 AM, Piter Dias <[hidden email]> wrote:
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Your best bet is to ask this question before starting to code! I think you want to leave the master branch as just the master branch. So you branch and put your local changes in. Check this in. Now branch again and perform your work.On 22 May 2014 01:37, Michael Sharpe <[hidden email]> wrote:
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
git cherry-pick is another good suggestion: you could use cherry-pick to fix things up to create a clean branch, but it won't fix up the old branch you've created to remove the commits that contain the projects. See http://git-scm.com/docs/git-cherry-pick. It could be used to fix up this situation if you: 1) Create a new branch for the pull request at the commit before the projects were committed - I'm going to call this branch ToShare.
2) Cherry-pick the commits from the branch where the projects were committed to the ToShare branch. This will apply the diffs for each individual commit to the ToShare branch, one at a time. 3) Create a pull request using the ToShare branch.
Once the pull request is merged in, you can work on fixing up your branches and fork of the official quantlib remote to better your work flow.
On Wed, May 21, 2014 at 7:02 PM, Dave Wiltshire <[hidden email]> wrote:
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
In reply to this post by igitur
Hi Francois,
all suggestions were good. The one I would pick up in this particular case is a combination of Piter's and Michael's: run "git rebase -i master", remove the commit you made on the projects (so that now you have a clean branch) and then use the Microsoft.Cpp.Win32.user property page to set the Boost directories (this doesn't modify the projects; instructions are at <http://quantlib.org/install/vc10.shtml>). Another, simpler way (which also works in more complex cases) would be to make the pull request and to tell me in a comment that I should skip one or more commits :) I can cherry-pick the other ones myself (I don't merge the requests directly on GitHub anyway; I pull them on my machine and try to compile them first). It has the disadvantage that the pull request on GitHub will look as if I didn't accept it, but I can live with this if you can. In this case, though, I'd use the property page and revert the project changes. Otherwise, you'll have the same problem over and over again. Luigi On Wed, May 21, 2014 at 2:24 PM, Francois Botha <[hidden email]> wrote: > Hi, > > Excuse me for going a bit off-topic. I'd like to contribute some changes, > but being new to git, I'm unsure how to progress. > > I've forked the quantlib repo, and cloned it. I've created a new branch to > work on. Everything is still clean. Now, I first have to modify my .vcxproj > files to point to my own boost installation. Obviously these are changes > that I don't want to include in the pull request later. After adding boost > and checking that it compiles correctly, I do a commit. > > Now I'm ready to start with the actual work. Let's assume I've finished that > and do another commit. > > How do I proceed now? I want to create a pull request, but I don't know how > to exclude the original, irrelevant commits. Is this easily possible? Should > I use git rebase or have used multiple branches? I also posed this question > on http://stackoverflow.com/questions/23781928/git-ignore-first-few-changes > > Once I figure this out, I want to apply a similar technique to pull in the > outstanding commits from Peter's changes (to let the QuantlibAddin build > successfully) and then do some work to expose more functions for the AddIn. > Yet again, I'll have to create a pull request, but I want to exclude Peter's > changes, because those are already in a pull request. > > Sorry for the newbie questions, but I hope you'll appreciate the > contributions that I can make. > > regards > Francois Botha > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > QuantLib-dev mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Thanks for the advice, everyone. Luigi/Piter, I didn't know about http://quantlib.org/install/vc10.shtml - but what I did was similar. Instead of modifying the Microsoft.cpp.<Platform>.users.props file, I created a separate boost.props file and add that via property manager (a tip that I got off StackOverflow). At the time it seems like a cleaner approach that modifying Microsoft.cpp.<Platform>.users.props , but it still requires a .vcxproj file change.
Dave, luckily I foresaw this, so I did ask it before starting to code. And my code change was small, so I could experiment a bit. In the end, git rebase --interactive master did what I wanted it to do. I could remove the project file change commit. But I see that actually reverts the change, which kind of makes sense. I would've like to keep the commit, but just not push it, but I think the only clean way to do that is with multiple branches, as Michael suggested. I want to shy away from having multiple branches.
Thanks again. Francois Francois Botha
On 22 May 2014 09:37, Luigi Ballabio <[hidden email]> wrote: Hi Francois, ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |