HackerTrans
热门最新趋势评论往期问答秀出招聘

git-pull

no profile record

评论

git-pull
·9年前·讨论
> it has no opinion on workflows

Oh really? Staged/Unstaged + Commit + Push to remote+branch. Branches (I suppose you could chuck everything in master), and opt-in or out of tagging.

Maybe users will keep their own remote repositories ("forks")? Even then, it's still pulling in code with the same history that's going to get reconciled via a merge or rebase. Whether it's "forked" to their own repo or in a branch of the "main" repo, it's all the same in the end.

> there's a need for a tool that will automate and enforce git workflows

There's easy, light-weight branching baked right into git.

They scale locally, remotely, and also work with different user's remotes.

You can also merge branches into branches. You can pull --rebase them as well.

> there's a need for a tool that will automate and enforce git workflows.

Beyond branches and remotes?

> I wrote a hacky 'git sync' script at an old company and it achieved what sending a bunch of developers on a course about git did not (it sped up the workflow and cut down on git errors).

Checking out branches and git add/status/diff/commit/push is that time consuming not only would you need to create a shortcut, other devs would opt-in to it?

I use shortcuts for various things in my shell. I have a .gitconfig in my dot-config files (https://github.com/tony/.dot-config). Personal tweaks for coloring and editor settings, a global gitignore. I'm the kind of a guy who picks up shell plugins for fun to try them, but I know that pushing a tool on top of a VCS on colleagues won't go over well.

What did `git sync` do?
git-pull
·9年前·讨论
> Good developers engineer repetition away. Great developers share what they build. Hence Git Town.

As someone who has engineered repetition away and shares what he builds, I agree, and admire your gumption.

> intentionally designed as a low-level and generic tool.

git is high level. and opinionated. It has branches and tags baked right in. Compare to SVN or CVS where the support is second class.

> requires running many Git commands for each operation, and is highly repetitive.

I run lots of git commands by hand, and can be pretty verbose in commit messages. I (sort of) try to follow this: https://chris.beams.io/posts/git-commit/

However, to speed things up, I will sometimes at shell prompt use `ctrl-r` and search history a bit, then `ctrl-e` to start scrolling in a line brought back up if I want to both 1. see what I committed last, and 2. get a head start on writing the commit message.

I also find the staging workflow git has (another thing I personally consider high-level, purposeful, opinionated to git, and use regularly) to be very convenient. I can type `git status`, `git diff`, `git diff --cached` to see what's staged and unstaged. I can use `git reset` to unstage a file. Overall, I get more granularity on which files I want to add to that commit. This comes in really handing when reverting, merging and rebasing.

So in my workflow, I don't want to give up control of these things.

Apparently, while I don't use these features, `git bisect` and `git blame` also benefit from being thoughtful with commits.

> It shows the Git commands it runs for you, as well as their output.

I am glad to hear that.

> nor does it try to shield you from learning how Git works

This is what irks me. I view git as high level and opinionated already, and have no way of knowing how it would effect someone learning git. I developed my own habits w/ VCS a long time ago.

That said, leave it up to the people who want to try your project.

(I followed you and starred your repository.)