git-repo-updater icon indicating copy to clipboard operation
git-repo-updater copied to clipboard

Handling of submodules and local changes

Open monotasker opened this issue 11 years ago • 2 comments

Hi. Thanks for this great script. Before I use it, though, I'm wondering how it handles Git submodules. Does it pull the latest version of each submodule repo, or does it honour the commit id in the submodule record? Fwiw, I would like to have the option to do either. But if the submodules are pulled from the remote repo the script should really update the submodule record with those new commit ids.

Also, what happens if I make changes to local repos? Will this script push changes from all of my projects as well? (This is something that I would want--one pull at the start of my session and one push at the end.)

Thanks again.

monotasker avatar Feb 13 '13 16:02 monotasker

Well, it's an old script that I made while still playing around with git / Python packaging, and I haven't touched it much since, so it's devoid of many features that you would expect it to have. I believe submodules are ignored, and it won't update a repo if you have local changes since this would cause a conflict. I'm uncomfortable about automatically pushing. Isn't that something you generally do as you develop, not for multiple projects at the end of a session? Actually, I can see that being useful if you only have an internet connection for a very short amount of time. An idea for me to consider.

Anyways, glad to know the tool has some interest in it. Still, it'll have to remain low-priority for some time, since I have a number of other projects to work on first.

earwig avatar Feb 13 '13 22:02 earwig

Thanks, Ben, for the quick response. For me the automatic pushing is the flip-side of automatic pulling -- it keeps me from forgetting to push one of the repos I've been working on during a session, working on the branch from another machine, and then ending up with merge conflicts that prevent an automatic pull. But this may be partly a symptom of my workflow -- largely working as sole developer but pulling and pushing from several different machines.

Anyhow, I've thrown together an ugly bash script and if I get around to integrating it with gitup I'll send you a pull request.

Cheers,

Ian

On Wed, Feb 13, 2013 at 5:47 PM, Ben Kurtovic [email protected]:

Well, it's an old script that I made while still playing around with git / Python packaging, and I haven't touched it much since, so it's devoid of many features that you would expect it to have. I believe submodules are ignored, and it won't update a repo if you have local changes since this would cause a conflict. I'm uncomfortable about automatically pushing. Isn't that something you generally do as you develop, not for multiple projects at the end of a session? Actually, I can see that being useful if you only have an internet connection for a very short amount of time. An idea for me to consider.

Anyways, glad to know the tool has some interest in it. Still, it'll have to remain low-priority for some time, since I have a number of other projects to work on first.

— Reply to this email directly or view it on GitHubhttps://github.com/earwig/git-repo-updater/issues/1#issuecomment-13523046.

Ian W. Scott, PhD (McMaster RS) Associate Professor of New Testament Tyndale Seminary Toronto, Ontario, Canada http://www.ian-w-scott.com

Paul's Way of Knowing: Story, Experience and the Spirit (WUNT II/205; Tübingen: Mohr Siebeck, 2006/Grand Rapids: Baker Academic, 2008).*

The Online Critical Pseudepigrapha* (Atlanta: Society of Biblical Literature, 2006-). Online: http://www.purl.org/net/ocp.

monotasker avatar Feb 20 '13 16:02 monotasker