Something like: for module in a b c d do cd $module git pull cd. But I assure you they not only work but work across several of our projects with numerous submodules stored at several directory levels. I welcome suggestions for improvements especially in the most obvious places. So, not strictly a TortoiseGit solution (that doesn't exist), but still convenient enough.Īs is likely evidenced by the comments in those scripts, I am no Bash professional and clearly hacked them together. Gitpullall.sh does just what you think, it goes and fetches everything. If anything is left over at the end of the year the amount is shared between the developers. Donations will be used to pay hosting and other costs. Works in any project - no need to tweak it each time. TortoiseGit is developed by volunteers in their spare time. ppk (PuTTY key) config setting into each one. So, if they just run gitsetup.sh, it takes care of all of that - it sets up each submodule, pulls it, and even inserts the special. They'll use the command line, which will point each submodule at its repo but not associate it with your Tortoise/PuTTY key like a normal Pull would.TortoiseGit is just going to get in their way - it doesn't really have anything to cope with this problem yet.When someone else pulls your project down via TortoiseGit, they're going to have worse than needing to pull all submodules - they won't even have those submodules configured. Gitpullallhead.sh: git submodule foreach git pull origin master Or if you'd prefer to fetch HEAD on your submodules, not the commit the parent repo was checked in with: # -i means overwrite the file rather than printing the result to # I have no idea how to just say if not grep, so screw it here's an empty then # -q says don't print the grep results, just return 0 or 1 # 4) Insert line (entire puttykeyfile line we picked up earlier)Įcho 'Inserting missing TortoiseGit. # it doesn't become an issue when we use it in sed # pass to sed to double-escape all backslashes (Windows problem) - that way # puttykeyfile = C:\\Users.\\.ssh\\PuTTY.ppk In every new project with submodules, I dump the following 2 scripts into the root:Įcho "Setting up submodules for TortoiseGit/Putty" There is no current way to do this in TortoiseGit, although I've found the author is very responsive to good ideas if you submit them as clear Feature Requests. There is now a way to do this in TortoiseGit, which the other answer covers old script approach that can be useful for automation scripts below.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |