55 points · by pcr910303 · 7y ago · 28 comments
[alias]
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --decorate --date=short
quick-push = "!f() { git add . && git commit -m \"$1\" && git push; }; f"
grep-log = log -E -i --grep
grep-hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --decorate --date=short -E -i --grep> ## The Concept
> GitHub for Mac is not just a Git client.
> This comment[0] on Hacker News says it best:
>> They haven't re-created the git CLI tool in a GUI, they've created something >> different. They've created a tool that makes Git more accessible. Little >> things like auto-stashing when you switch branches will confuse git >> veterans, but it will make Git much easier to grok for newcomers because of >> the assumptions it makes about your Git workflow. Why not bring this >> innovation back to the command line?
It provides a few interfaces like switch <branch> which switches to specified branch by automatically stashing any changes, or sync [<branch>] which (smartly) synchronizes the given branch. Etc...
It’s probably as not as big of a deal for people who never venture into ops land but if you’ve ever done any sort of ops related work you know that sometimes you’re only given hammers and screwdrivers instead of power tools and expected to make it work.
That said I do see the value in these tools - git is quite an intimidating beast and any tools that help people become more familiar with it can’t be a bad thing - so long as they don’t eventually become a crutch for the end user to avoid learning about how the base tool works.
Some things off the top of my head that are in my opinion not at all trivial for even intermediate git users:
- How do you fix a typo in the commit message of the second-last commit that you pushed to remote?
- I accidentally committed something to the wrong branch. What's the best way to uncommit it from that branch and commit it to the right branch?
- What are the differences between the working tree, directory tree, index, and staging area?
- How do I "un-add" a file I just staged?
- I've heard "git reflog" is useful. What is it?
Legit users beware.
> $ git sync > # Stash, Fetch, Auto-Merge/Rebase, Push, and Unstash
Good luck if any of this actions fail. With raw Git you can easily correct the problem and move on. With leGit, you'll be left wondering how screwed the current state of your repo is.