Author: lukaszlenart
Date: Wed Jan 29 07:00:12 2014
New Revision: 1562369
URL: http://svn.apache.org/r1562369
Log:
Updates information about repos and git-flow
Modified:
struts/site/trunk/content/markdown/git-for-struts.md
Modified: struts/site/trunk/content/markdown/git-for-struts.md
URL:
http://svn.apache.org/viewvc/struts/site/trunk/content/markdown/git-for-struts.md?rev=1562369&r1=1562368&r2=1562369&view=diff
==============================================================================
--- struts/site/trunk/content/markdown/git-for-struts.md (original)
+++ struts/site/trunk/content/markdown/git-for-struts.md Wed Jan 29 07:00:12
2014
@@ -2,89 +2,9 @@
# Using Git with Struts
-So far, Struts 2 is using SVN. There are plans to move on to GIT but
-the plannings have not been completed yet. In addition we'll only
-move with new versions of Struts to Git. Struts 1 will stay in SVN.
-
-Luckily there is a way to work with Git backed by SVN. This document
-explains, how a developer:
-
- * can work on outdated code like Struts 1 with Git
- * can synchronize Git from Github with the Struts 2 repository
-
-This page reflects some knowledge from the
-[Git at Apache project](http://wiki.apache.org/general/GitAtApache).
-
-## Setting up your Struts environment
-
- git clone git://git.apache.org/struts2.git
- cd struts2/.git
- wget http://git.apache.org/authors.txt
- cd ..
- git config svn.authorsfile ".git/authors.txt"
-
- # check if your username and email are identical to those in the author
file
- git config user.name
- git config user.email
-
- # if they are not identical, set the ASF values locally
- # git config user.name <Your Name>
- # git config user.email <Your Email>
-
- git svn init --prefix=originsvn/ -s
https://svn.apache.org/repos/asf/struts/struts2/
- git svn rebase
-
-
-You might need to accept SSL certificates from Apache. Please check the
-[fingerprint of the servers](http://www.apache.org/dev/machines).
-If in doubt, ask at Struts mailing list or Apache infra.
-
-If you are frequently asked on the certificates or if you get that error:
-
- Unable to determine upstream SVN information from working tree history
-
-...then you should make sure you are using SVN version 1.7 (not 1.8, not 1.6).
-Please also consult the [troubleshooting page](troubleshooting-git-svn.html).
-
-You can go on for now and ignore this message.
-After this, you'll need to fetch the old history.
-
- git svn fetch --log-window-size 10000
-
-Heads up: this command above will need a good while to run - please plan
accordingly.
-When you change something in the code, you can commit it with:
-
- git svn dcommit
-
-This will commit all your git commits to svn. One git commit == 1 svn
revision. Consider rebase.
-Please don't forget, there is the --dry-run option, which tests the commit
only.
-
-It will output things like:
-
- diff-tree 56bfadfc12a8129e5ea6668714fae34704242636~1
56bfadfc12a8129e5ea6668714fae34704242636
-
-You can watch the modification with git again:
-
- git diff-tree 56bfadfc12a8129e5ea6668714fae34704242636~1
56bfadfc12a8129e5ea6668714fae34704242636
-
-Which will output for example:
-
- :000000 100644 0000000000000000000000000000000000000000
e2b24b623fc1cf2d0316a48bb1d69a9eeb7e0719 A .gitignore
-
-
-## Working with SVN branches
-
-Create a new local branch and switch to it in GIT:
-
- git checkout -b mybranch-svn origin/mybranch
-
-Map the GIT branch to the according SVN branch:
-
- git reset --hard origin/mybranch
-
-For reference, you can override the commit url:
-
- git svn dcommit --commit-url
https://svn.apache.org/repos/asf/struts/struts2/branches/mybranch
+Struts uses Git and to manage the repository the git-flow was adopted, to read
more about that please follow the links below:
+- http://nvie.com/posts/a-successful-git-branching-model/
+- https://github.com/nvie/gitflow
## Contributing with GitHub
@@ -96,9 +16,9 @@ to use your code and distribute it.
You should receive an email a few days after you submitted it and appear in
the
[committer index](http://people.apache.org/committer-index.html) in the
section "unlisted CLAs".
-Once done, you can clone the [Apache Struts mirror on
GitHub](https://github.com/apache/struts2):
+Once done, you can clone the [Apache Struts mirror on
GitHub](https://github.com/apache/struts):
- git clone [email protected]:apache/struts2.git struts2-mirror.git
+ git clone [email protected]:apache/struts.git struts-mirror.git
Please create an issue on our [issue
tracker](https://issues.apache.org/jira/browse/WW).
You'll receive an issue number which you should use to create a working branch
(for example WW-4196).
@@ -107,19 +27,19 @@ If you are sending a pull request, pleas
the official mirror. We cannot accept and close pull requests there which is
the reason
we have an own account. You can find it here:
-[https://github.com/apachestruts/struts2](https://github.com/apachestruts/struts2)
+[https://github.com/apachestruts/struts]
Please send the pull request to "trunk".
It is of course possible to add us as upstream repo:
- git remote add upstream [email protected]:apachestruts/struts2
+ git remote add upstream [email protected]:apachestruts/struts
## Working with remote branches from GitHub
You can add a remote branch from GitHub like this:
- git remote add opensourceio https://github.com/opensourceio/struts.git
+ git remote add opensourceio [email protected]:opensourceio/struts
Pull changes with:
@@ -129,19 +49,10 @@ When merge conflicts happen, these can b
git mergetool
-After the merge, you need to commit the changes to svn with:
-
- git svn dcommit
-
-## What, if the svn commit goes wrong
-
-When git svn messed up the repository, you just can revert the SVN revision.
Reverting in SVN
-is basically merging a previous commit. Like:
+After the merge, you need to commit the changes to Apache Git with:
- svn merge -r1521783:1521602 .
- svn commit -m 'reverted wrong git svn dcommit' .
+ git commit
## Further reading
* [Git at Apache](http://wiki.apache.org/general/GitAtApache)
- * [git-svn is a gateway
drug](http://www.robbyonrails.com/articles/2008/04/10/git-svn-is-a-gateway-drug)