On Fri, Jan 9, 2015 at 10:12 AM, Christian Scheible
<[email protected]> wrote:
>
> I have opened a few tickets for DSpace bugs in JIRA and would like to add the 
> fixes to the tickets. So I cloned the git repository, created a branch, fixed 
> a bug and tried to push the branch to make it a pull request. But I don't 
> have the rights to push. Should I attach patches instead or how can I solve 
> this?


Hi Christian,

this page [1] describes everything you need to work with the git
repository and submit pull requests. The recommended setup part is
important. You started your local repository as a clone of the
official DSpace/DSpace repository. But in order to create PRs, you
must first fork (=clone on GitHub) DSpace/DSpace to yourname/DSpace,
then clone yourname/DSpace to your computer using git clone. You have
write access to your fork, therefore you can push there. When you go
to yourname/DSpace in the GitHub web interface after you pushed a
branch, there's a button to create a PR against DSpace/DSpace. Sounds
complicated, but really isn't.

There is a way to modify your current repo this way, but it's easy to
screw up if you've never done this before. Therefore it's safer to
transfer your changes from your old clone to the new clone this way,
one branch at a time:

cd ~/oldclone
~/oldclone$ git checkout branch1
~/oldclone$ git format-patch HEAD^ --stdout > branch1.patch
cd ~/newclone
~/oldclone$ git checkout master
~/oldclone$ git checkout -b branch1
~/oldclone$ git am < ~/oldclone/branch1.patch

Note the HEAD^, which means take the last commit in that branch. If
you want to take the last N commits, use HEAD~N instead.
Alternatively, you can also specify a hash of the commit _before_ the
first commit you want to take.

Even if something goes wrong, you can still submit these .patch files
to Jira and we'll get everything we would get in a PR.

[1] 
https://wiki.duraspace.org/display/DSPACE/Development+with+Git#DevelopmentwithGit-ContributingChangestoDSpaceviaGitHub


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to