Project

General

Profile

Checking out from Git

Added by Splendeo Innovación almost 15 years ago

Hi everyone,

I'm going to do a new Redmine installation (for production) and I'd like to know if it is possible to use edavis10's git repository instead of the original redmine svn.

I'd like to use the 0-8 stable branch on Git - but I'm not sure about how to do it. I've doubts about how to clone, how to update and how to handle my own changes - mostly because of my lack of experience with Git.

1. Initial clonage

If I were to use SVN, the installation guide would be easy to follow. I'd do this:

cd /var/rails
svn co http://redmine.rubyforge.org/svn/branches/0.8-stable my_redmine_app

So I'm trying to do the equivalent on Git. I think I must first clone the git repo, and then add a "local branch that 'traces' the remote branch".

cd /var/rails
git clone git://github.com/edavis10/redmine.git my_redmine_app
cd my_redmine_app
git checkout --track -b 0.8-stable origin/0.8-stable
Is this correct?

2. Updating

If I were to use svn, according to the guide, I would just have to do

svn update

I've looked in several guides but I'm not sure about how to update my local 0.8 branch with the remote 0.8 branch. Maybe this?

git fetch
Please confirm / correct.

3. Handling my own changes

It is possible that I end up needing to make my own changes on the redmine code (aside from plugins). I guess in this case I want to make a fork in github (I've already created a fork using github's web interface).

In that case, the initial clonage should be against my own github repository, right?

But if I use my own github repository, how do I update? How do I update my "remote repository" with edavis10's changes? :/


Replies (1)

RE: Checking out from Git - Added by Eric Davis almost 15 years ago

Splendeo Innovación wrote:

So I'm trying to do the equivalent on Git. I think I must first clone the git repo, and then add a "local branch that 'traces' the remote branch".

Correct.

2. Updating

git fetch

You would also need to merge the changes. git fetch will only download the changes into your clone.

git merge origin/0.8-stable

3. Handling my own changes

It is possible that I end up needing to make my own changes on the redmine code (aside from plugins). I guess in this case I want to make a fork in github (I've already created a fork using github's web interface).

In that case, the initial clonage should be against my own github repository, right?

Yes.

But if I use my own github repository, how do I update? How do I update my "remote repository" with edavis10's changes? :/

You'll need to add my repository as a second remote and fetch the new changes from it. The Github help used to have a few documents explaining the process (if they mention the "upstream repository", that's my repository).

Eric Davis

    (1-1/1)