git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Please provide a one-liner for syncing with the original/source project
@ 2019-11-17 20:56 Jeffrey Walton
  2019-11-18 10:59 ` Pratyush Yadav
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Walton @ 2019-11-17 20:56 UTC (permalink / raw)
  To: Git List

Hi Everyone,

One of my common workflows is, clone a open source project like Git,
OpenSSL, etc. Then make some changes and push my changes to my clone.
And maybe submit a pull request to the original/source project. After
the initial clone my project becomes out-of-sync with the project of
interest.

I have to do something special to get my copy of the project back
in-sync with the original/source project. It is not trivial to get
back in sync. It takes three or four separate commands if all goes
well. And in my case, I have to look up the instructions because they
are not ingrained in memory (like
https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).

This sync workflow is so common Git should be providing it. Anyone who
has cloned from GitHub, GitLab, etc needs it. Folks should not need to
do special things for common workflows. When sites like GitHub and
GitLab are providing explicit instructions to sync with the
original/source project should signal it is common and people need it.

I'd like a one-line command to resync with the original or source
project (and not my clone). I think a 'git sync' command would be a
good addition to the Git tools.

It would be nice if sites like GitHub would value add the ' upstream =
...' to a .git/config, but that is not Git's problem. I'll settle for
manually adding upstream so 'git sync' just works.

Thanks in advance.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Please provide a one-liner for syncing with the original/source project
  2019-11-17 20:56 Please provide a one-liner for syncing with the original/source project Jeffrey Walton
@ 2019-11-18 10:59 ` Pratyush Yadav
  0 siblings, 0 replies; 2+ messages in thread
From: Pratyush Yadav @ 2019-11-18 10:59 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: Git List

On 17/11/19 03:56PM, Jeffrey Walton wrote:
> Hi Everyone,
> 
> One of my common workflows is, clone a open source project like Git,
> OpenSSL, etc. Then make some changes and push my changes to my clone.
> And maybe submit a pull request to the original/source project. After
> the initial clone my project becomes out-of-sync with the project of
> interest.
> 
> I have to do something special to get my copy of the project back
> in-sync with the original/source project. It is not trivial to get
> back in sync. It takes three or four separate commands if all goes
> well. And in my case, I have to look up the instructions because they
> are not ingrained in memory (like
> https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).

FWIW, these multiple steps can be replaced by 'git pull upstream 
master', assuming you have 'master' checked out locally.
 
> This sync workflow is so common Git should be providing it. Anyone who
> has cloned from GitHub, GitLab, etc needs it. Folks should not need to
> do special things for common workflows. When sites like GitHub and
> GitLab are providing explicit instructions to sync with the
> original/source project should signal it is common and people need it.
> 
> I'd like a one-line command to resync with the original or source
> project (and not my clone). I think a 'git sync' command would be a
> good addition to the Git tools.

What would 'git sync' do that 'git pull upstream' or 'git pull --rebase 
upstream' can not do?
 
> It would be nice if sites like GitHub would value add the ' upstream =
> ...' to a .git/config, but that is not Git's problem. I'll settle for
> manually adding upstream so 'git sync' just works.
> 
> Thanks in advance.

-- 
Regards,
Pratyush Yadav

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-18 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 20:56 Please provide a one-liner for syncing with the original/source project Jeffrey Walton
2019-11-18 10:59 ` Pratyush Yadav

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).