Earlier quoted context omitted.
Never heard of Azure Repos before. Do they have any unique features that could be merged into Github?
When reviewing PR, it has nice file/folder tree on left side, which is far superior compared to scrolling over 10+ files without context on Github, I hope Github gets this soon...
GitHub CLI 1.0
201–210 of 221 posts
Re: GitHub CLI 1.0
#202Earlier quoted context omitted.
This is awesome, but with all due respect I also wish git itself was also improved. Goddamn merge commits, and always have to go googling "oh shit how do I erase the last commit" when I accidentally commit to master. It should at least spit out a warning if you created a branch and then try to commit to master. Git lfs and git-crypt should be a feature of the main product and not plugins. Files over a certain size sh…
There are "hooks" in git that can be used to modify its behavior, to e.g. "spit out a warning if you created a branch and then try to commit to master" This seems to be a good resource https://githooks.com/
How this one may be done? It sounds wonderful but I have no idea how to implement such thing (and if not included in git already, I hope that I can reuse code rather than reimplement it)
Re: GitHub CLI 1.0
#203Earlier quoted context omitted.
Good point. It never seemed like the distributed "selling point" of Git (and Mercurial et al) really caught on. I remember trying to extoll it's virtues to our team at the time (pre-Github). No one source of truth as such, just everyone swapping changes as needed. It's kind of ironic that Git's most popular incarnation is based upon a centralised model. Is it just a case of the distributed workflow just not being tha…
I think in practice it's most useful as a recovery feature. I once got locked out of my Bitbucket account and had to recover a repo, which I'd been paid to develop, from Heroku of all places. I was extremely grateful at that point that all git repos are complete mirrors of each other.
Re: GitHub CLI 1.0
#204Earlier quoted context omitted.
CLI or not, it's centralized/siloed all the same. I'm sticking to Git.
Good point. It never seemed like the distributed "selling point" of Git (and Mercurial et al) really caught on. I remember trying to extoll it's virtues to our team at the time (pre-Github). No one source of truth as such, just everyone swapping changes as needed. It's kind of ironic that Git's most popular incarnation is based upon a centralised model. Is it just a case of the distributed workflow just not being tha…
Are people forgetting what life was like back in SVN days, when not having a connection to the server meant not being able to do many operations?
Re: GitHub CLI 1.0
#205Great news but my first thought was that it's hard enough for juniors to grasp the difference between git and github. Now they will be even more confused... :]
Re: GitHub CLI 1.0
#206Earlier quoted context omitted.
There are "hooks" in git that can be used to modify its behavior, to e.g. "spit out a warning if you created a branch and then try to commit to master" This seems to be a good resource https://githooks.com/
> "spit out a warning if you created a branch and then try to commit to master" How this one may be done? It sounds wonderful but I have no idea how to implement such thing (and if not included in git already, I hope that I can reuse code rather than reimplement it)
Re: GitHub CLI 1.0
#207Earlier quoted context omitted.
There are "hooks" in git that can be used to modify its behavior, to e.g. "spit out a warning if you created a branch and then try to commit to master" This seems to be a good resource https://githooks.com/
> "spit out a warning if you created a branch and then try to commit to master" How this one may be done? It sounds wonderful but I have no idea how to implement such thing (and if not included in git already, I hope that I can reuse code rather than reimplement it)
Re: GitHub CLI 1.0
#208Earlier quoted context omitted.
> "spit out a warning if you created a branch and then try to commit to master" How this one may be done? It sounds wonderful but I have no idea how to implement such thing (and if not included in git already, I hope that I can reuse code rather than reimplement it)
Oh, hey now. Look at the very bottom of the resource I sent you, under "Snippets" https://githooks.com/
and I would want
"spit out a warning if you created a branch and then try to commit to master"
Sometimes I would want to commit to master, I want an overridable warning iff I just created branch.
Re: GitHub CLI 1.0
#209Earlier quoted context omitted.
CLI or not, it's centralized/siloed all the same. I'm sticking to Git.
It would be really nice if the other features of github could get into the decentralized model of git... I could imagine issues and PR reviews/comments all being mini-commits to some kind of parallel metadata repo under the hood for example.
Re: GitHub CLI 1.0
#210Earlier quoted context omitted.
Oh, hey now. Look at the very bottom of the resource I sent you, under "Snippets" https://githooks.com/
"A pre-push hook that prevents direct code push to master branch" and I would want "spit out a warning if you created a branch and then try to commit to master" Sometimes I would want to commit to master, I want an overridable warning iff I just created branch.
#!/bin/sh
BRANCHES_POINTING_TO_HEAD=$(git branch --contains HEAD |wc -l)
CURRENT_BRANCH=$(git branch --show-current)
if [ "$BRANCHES_POINTING_TO_HEAD" -gt 1 ]; then
if [ "$CURRENT_BRANCH" = "master" ]; then
echo "You're committing to master even though other branches exist."
echo "override with git commit --no-verify"
exit 1
fi
fi
You'll need git 2.22 for the --show-current git option.But also I would suggest instead using
git checkout -b
to create and switch branches in one command