title = Remote Tags
cards = pull push commit-auto checkout

[description]

When you work with remote repositories, tags are not pushed or pulled automatically.

You can push a tag with
    git push <remote> <tag-name>
Or all tags with:
    git push <remote> --tags
    
Deleting tags on your remote works with: 
    git push <remote> --delete <tag-name>
    
You can also sync 
    git fetch <remote> --prune --prune-tags


Add a tag named "v2" to the last commit and push it to the remote. Also pull the v1 tag to your local repository.
[setup yours]

git checkout main

git checkout main
echo "toothbrush sharing" > project-ideas
git add .
git commit -m "First idea"

echo "Is my phone upside down? App" >> project-ideas
git commit -am "Another idea"



git push friend main

git branch -u friend/main main

[setup friend]



[actions friend]

git tag v1 HEAD~1

[win]
# v1 tag in your repo
test "$(git show v1 -s --format=%h)" = "$(git show HEAD~1 -s --format=%h)"

# v2 tag in your repo
test "$(git show v2 -s --format=%h)" = "$(git show HEAD -s --format=%h)"


[win friend]

# v2 tag in the remote
test "$(git show v2 -s --format=%h)" = "$(git show HEAD -s --format=%h)"
