tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Finally getting around to switching to Git
Date Thu, 25 Apr 2019 19:07:58 GMT
Hash: SHA256


On 4/25/19 14:03, Igal Sapir wrote:
> Chris,
> On 4/25/2019 10:32 AM, Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> Igal,
>> On 4/23/19 12:52, Igal Sapir wrote:
>>> Another thing that I have changed in my workflow based on
>>> Mark's past suggestion, is that I keep a local repo for each
>>> major branch now.
>> Okay, I have done the following:
>> 1. Fork tomcat master to my own GitHub account
> Since you are a committer you don't need to this.  That is useful
> though if you want to show a large update so that others can review
> it, but you can also do that in a new branch.
>> 2. git clone URL 3. edit/add/commit/push 4. Create a PR
>> I'm sure I can import the PR into tomcat-master. No problem.
>> Now, when attempting to keep my fork current, I've always done 
>> something like:
>> git remote add upstream master-url git checkout master git fetch
>> upstream
>> And I'm all up-to-date.
>> When I did that, I ended up bringing-down the 7.0.x and 8.5.x
>> branches as well. How can I limit the upstream to just the
>> master?
>> Or does my fork have to have everything, but I have to checkout
>> a single branch? If so, I'm not sure how to do that.
> Your fork has the whole git repository, but fortunately git
> manages resources much better than Subversion, for example, so it's
> not too bad at all.
> You can see a list of the local branches and which branch you are 
> currently on with the command, `git branch`, which will show
> something like this:
>> git branch
> 7.0.x 8.5.x * master

$ git branch
* master

So it looks like I forked the branch, which was the intent. To get
this down to my local system, I just did a "git clone [my-repo-url]"
and that's what I got.

> The `*` denotes the current branch, so I am on the master branch. 
> Switching to the 8.5.x branch with `git checkout 8.5.x`
>> git checkout 8.5.x
> Checking out files: 100% (1787/1787), done. Switched to branch
> '8.5.x' Your branch is up to date with 'origin/8.5.x'.
> And then running again `git branch` will show the * next to 8.5.x:
>> git branch
> 7.0.x * 8.5.x master
> In some projects it's easy to maintain a single repository and
> switch between branches, but I find the differences between 7.0.x
> and master to be so major that I chose to follow Mark's method and
> keep separate local copies where the IDE settings do not get
> mangled up each time I switch branches.

Sounds good. What is Mark's Methodâ„¢? Is it documented anywhere?

- -chris
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message