joseluisq / gitnow

Speed up your Git workflow. :tropical_fish:
https://github.com/joseluisq/gitnow
MIT License
391 stars 25 forks source link

add '--tags' to pull auto mode xdefaults #39

Closed lukasgierth closed 3 years ago

lukasgierth commented 3 years ago

It resolves #36

joseluisq commented 3 years ago

Thanks :+1:

joseluisq commented 3 years ago

Just info for future users: Git can complain when user local tags are not synchronized with remote ones. For example this below will fail:

~> pull
# From git.server.com:ld/repo
# * branch              develop    -> FETCH_HEAD
# ! [rejected]          2.4.8      -> 2.4.8  (would clobber existing tag)
# ! [rejected]          v2.4.8     -> v2.4.8  (would clobber existing tag)

So to fix this it's necessary to update all local tags via fetch first and then use pull.

~> git fetch --tags -f
# remote: Enumerating objects: 144, done.
# remote: Counting objects: 100% (111/111), done.
# remote: Compressing objects: 100% (63/63), done.
# remote: Total 64 (delta 45), reused 0 (delta 0), pack-reused 0
# Unpacking objects: 100% (64/64), 14.92 KiB | 80.00 KiB/s, done.
# From git.server.com:ld/repo
#  * [new branch]        feature/abc  -> origin/feature/abc
#  t [tag update]        2.4.8               -> 2.4.8
#  t [tag update]        v2.4.8             -> v2.4.8