tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Coty Sutherland <csuth...@apache.org>
Subject Re: Finally getting around to switching to Git
Date Thu, 25 Apr 2019 17:56:47 GMT
On Thu, Apr 25, 2019 at 1:32 PM Christopher Schultz <
chris@christopherschultz.net> 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
> 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?
>

You can set the branch for your remote to master (or do it when you clone)
which should ignore other branches:
git remote set-branches upstream master

Then optionally configure --no-tags in your git config (or use --no-tags
each time you git-fetch):
git config --add remote.upstream.tagOpt --no-tags

Then try fetching to verify it worked:
git fetch upstream [--dry-run]


>
> 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.
>

It doesn't, but by default a `git fetch` pulls down all new work that
exists on the remote, but not your local clone.


>
> I'm just *sure* I'm gonna love git once I get this all figured out.
> All the cool kids seem to love it, so it must be better, right?
>

:D


>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzB7zMACgkQHPApP6U8
> pFh2vA/9EnR8sJPLuF1pD31HECEckVVXnF0AlU2XzTjiPsWwDP+Z+jJAh5Q8KUG6
> zwdM17VuN3Yr3e6p55DGjD4EEn1OV2hxw1Ao/TnEJXHsDrt9Hhm9j0T4ddJRCPBk
> RSP2/by6pBneYr8jPnT0G9D2M+CZUI/cXIj4ntZ9w8+2lIOayR/B0H8Gfc077k+y
> hXza7mnxtm4W+mNfMz176Z19hn9culA6/Z9p/4ZqFAGwVnkItNvPKuJi+syfR9La
> LtJ3WY2Ut3g4KzL5D9YIrTzNf3rRKQLe8qgErUc18uhxOD8Ax5QG7x3VkXBlG8s1
> YFFvwVKmVNlG8pldle3eyBg/xE6IfxD5IYjWWPeScrpwSCnSSN2E77HyOqG1FlSl
> /F5x4b1Qo8lVUuD5jgYaUQOxHuwFmuM6jyHknJfzrHB3feLjwEYxMgTfDNJoPSd/
> 70Czh7at8HxYb5S9wQHWK4oZVSEpNoWENK0BnP2qyGbZ99kfIG1bo/Iev3P9etxx
> hWp1edDxb3msATQL3eyFCUhHis1T9nnVKK19y8XoPt0PqrmLUhc/Vm+RyGFxJLeS
> +xSU4v2GXsG07eQnK4jqLPUVV87PqFPKP+DHoFzE7rm8KYYtbgLtkmfhqKtvZnj7
> KZfqqYHViQzm6lP8CgWtPsOkbYh5xvkVZly2PiPPVC9v47Gp36U=
> =+ROt
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message