Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

git feature pull/track/checkout confusing #128

Open
emil-nasso opened this issue Nov 11, 2013 · 11 comments
Open

git feature pull/track/checkout confusing #128

emil-nasso opened this issue Nov 11, 2013 · 11 comments

Comments

@emil-nasso
Copy link

The information available about what git feature pull/track/checkout is lacking. I find it very confusing and don't know what the difference is.

pull doesn't seem to track, according to this:
http://stackoverflow.com/questions/18412750/why-doesnt-git-flow-feature-pull-track

The documentation here, or in the commandline, doesn't explain the difference:
https://github.com/petervanderdoes/gitflow/wiki/Reference:-git-flow-feature

@OpherV
Copy link
Contributor

OpherV commented Dec 18, 2013

Yeah that one's a major head scratcher :)
I'm the author of that SO question. Since posting I've resorted to using only git flow feature track, since I see no real use for git flow feature pull

In the gitflow plugin I'm developing for intelliJ I've even removed feature pull altogether

@dashesy
Copy link

dashesy commented Jan 7, 2014

Yes, would be great to remove pull, makes it more straight forward.

@petervanderdoes
Copy link
Owner

It is all confusing. Lets figure out how to improve and stay as close to original git commands as possible.

Current situation in git-flow

Pull

  • Acts like a regular git pull but a remote has to be given.
  • You can omit the branch prefix
  • If you pull a remote branch that doesn't exists locally, a new non-tracking branch is created.

Track

  • Creates a local tracking branch.
  • The name should exists remotely and will be used to create the local branch
  • You can omit the branch prefix

Checkout

  • Acts like regular git checkout without flags.
  • You can omit the branch prefix.

My thoughts

Checkout

  • With bash/zsh completion this command seems irrelevant but if you don't use completion it could be helpful.
  • I suggest dropping this command in a future release and add a warning per v1.8.0 that the command will be dropped on a future version (2.0?)

Track

  • No thoughts on this, it seems fine as it is.

Pull

  • This does seem confusing as it doesn't really does what git pull does.
  • I suggest dropping this command in a future release and add a warning per v1.8.0 that the command will be dropped on a future version (2.0?)

Let me know your thoughts on this.

@dashesy
Copy link

dashesy commented Jan 7, 2014

IMO, If pull could track in the meantime, that would fix the main issue, and then later either track or pull could be removed. Keeping pull seems more natural.
It is good to remove Checkout though, having one whole command seems too much to avoid typing few characters.
Also (I am not sure how), a way to fix the HEAD, if one accidentally does a git pull instead of/before the git-flow version would be extremely helpful.

@simonweil
Copy link

Why not combine pull and track into one command named pull?
This will be much more intuitive as every git user is used to using git pull.

@marcinant
Copy link

@petervanderdoes

I suggest dropping this command in a future release and add a warning per v1.8.0 that the command will be dropped on a future version (2.0?)

Why? Do you want to replace checkout with another command?
This command is very useful and I don't see any reason to drop it.

@silashansen
Copy link

For windows users without bash and autocomplete, checkout is useful.

@tommynsong
Copy link

just want to confirm that "git flow feature checkout {feature_name}" will be removed and resort to use normal "git checkout {feature_name}" instead?

@opensas
Copy link

opensas commented Jun 9, 2018

I'm a bit confused about what to use to replace git flow feature pull

I start tracking a feature on my remote with git flow feature track xx_feature

A couple days later, I want to work on that feature, but before that I want to pull any changes other might have made to it from remote

What should i use instead of git flow feature pull origin??? Should I go with git flow feature checkout xx_feature?

This kind of scenario is quite common indeed, I feel like the documentation is a bit lacking about it

@OpherV
Copy link
Contributor

OpherV commented Jun 9, 2018

@opensas you can just check out the branch git checkout feature/xx_feature and then a normal git pull

@Wolfium
Copy link

Wolfium commented Jul 17, 2018

While the solution works using plain git command, in my workflow, I mostly use git flow commands, this was inherited from usage from the IDE/editor that handles the add/commit phase, and then I choose to pull/push remotes using git flow commands or sometimes another plugin for gitflow either.
Said this, how much side effects would have this tool to keep this while you already know that is the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants