[ 
https://issues.apache.org/jira/browse/LUCENE-6985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15114007#comment-15114007
 ] 

Paul Elschot commented on LUCENE-6985:
--------------------------------------

I have some long running branches against trunk that I needed to move onto 
master.
These branches regularly get trunk merged into them, so rebasing will not work.

This command sequence takes a local branch brn from trunk to master.
Except for the merge and the cherry-pick, these steps can be easily done in 
gitk, normally with a right click:

git checkout brn
git merge trunk # produce a merge commit, possibly resolve any conflicts.

git tag brn.20160123 # tag the merge commit
git branch -D prefilltokenstream # delete the branch

git checkout master
git branch brn # recreate the branch starting on master
git checkout brn 
git cherry-pick brn.20160123 -m 2 # add a commit with the diff to trunk as 
merged above



> Create some (simple) guides on how to use git to perform common dev tasks
> -------------------------------------------------------------------------
>
>                 Key: LUCENE-6985
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6985
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>
> Some simple guides that demonstrate basic git principles and routine tasks 
> (below). The guides are here:
> https://github.com/dweiss/lucene-git-guides
> Core concepts
> 1. how to clone and setup lucene/solr git repo for local work
> 2. basic git concepts: branches, remote branches, references, staging area.
> Simple tasks:
> 1. Checkout branch X, create local branch Y, modify something, create a diff 
> for Jira.
> 2. Checkout branch X, create local branch Y, modify something, catch-up with 
> changes on X, create a diff for Jira.
> 3. Checkout branch X, create local branch Y, modify something, catch-up with 
> changes on X, apply aggregate changes from Y on X (as a single commit).
> 4. Backport feature/ commit C from branch X to Y via cherry picking.
> More advanced:
> 1. Create a feature branch off branch X, develop the feature, then apply it 
> as a series of commits to X.
> 2. Create a feature branch off branch X, develop the feature, then apply it 
> as a series of commits to X and Y (different branch).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to