Edit: An earlier version of this post's title seemed to suggest I encouraged moving away from GitHub. This was not, in fact, the intention, so the ...
For further actions, you may consider blocking this person and/or reporting abuse
This reminds me of something I perform all of the time... not pure bash, but helpful nonetheless.
I have about ~50 git repos I'm pulling down and tracking (others' projects, not mine), so this gnu parallel command says "enter each git repo in the current dir and perform a git pull".
Best part ... it runs in parallel. So I have 4 cpus and the git repos have nothing to do with each other... it runs four pulls at once.
That’s awesome!
Would you explain the
:::
part? I haven’t seen this syntax before. All I can find is that:
meanstrue
or something like that.It uses the output of the command as an input source. $(ls) would have done the same thing... I like to think of it as performing the operation on a current set.
It doesn't look familiar because its a specific parallel command option, not a general bash option.
Another silly example of a clock-counter ... the -k flag says keep the order (so things don't happen out of order). Perform an echo operation on three sets.
Wow, that really illuminates how Github forces us into suboptimal routines. Another example is updating a fork, that should really have been a single button click, not the local pull-push wrestlings.
Github has a utility called
hub
which provides the ability to create repos, fork them, create pull-requests, and few other things. It's meant to be a substituted for thegit
command since it implements all thegit
subcommands as well. github.com/github/hubIt's still not as cool as gitlab's "push-to-create"
I have been using hub but didn't know that was possible.
But I have now tried and failed to get it working:
Don't know if that is my hub version 2.2.9, and I can't get their latest version work, probably due to my old OSX, even though none of the errors said that.
No comparison with Gitlab in both convenience and usability, where there is no need to download anything.
This is something I set up so long ago, I don't even remember what I did.
All props to Gitlab for making it painless
Nifty aliases to simplify daily Git tasks, Victoria! Adding a few more I made that might help:
Note: These should be added in .bashrc & then reloaded either via by source .bashrc or opening a new terminal session
I learned about the
xargs
command. Thanks a bunch!I’m so glad! You’re welcome!
Very interesting.
I made something similar for Bitbucket : github.com/Shosta/DLBitbucketRepos
It clones all the repositories you own on Bitbucket.