Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can datalad push also be made to push tags? #49

Closed
3 of 4 tasks
mih opened this issue May 2, 2023 · 2 comments
Closed
3 of 4 tasks

Can datalad push also be made to push tags? #49

mih opened this issue May 2, 2023 · 2 comments
Labels
support-tracker Track a support event that occurred elsewhere via-datalad-channel report origin is a datalad-specific channel (chat/email/office hour)

Comments

@mih
Copy link
Contributor

mih commented May 2, 2023

Origin: DataLad chatroom 2023-05-02

Can datalad push also be made to push tags?

TODO (not necessarily to be performed in this order)

  • Inform OP/Add reference to this issue at origin
  • Clarifying Qs asked or not needed
  • Nature of the issue is understood
  • Inform OP about resolution
@mih mih added the support-tracker Track a support event that occurred elsewhere label May 2, 2023
@mih
Copy link
Contributor Author

mih commented May 2, 2023

datalad push is meant to work similar to git push and, importantly, honor its configuration. So the following is a demo how pushing tags works:

# set up a demo dataset
❯ datalad create ds
# demo git remote
❯ mkdir remote
❯ git -C remote init --bare
# register the remote in the dataset
❯ datalad siblings -d ds add -s origin --url /tmp/push/remote/
# configure all branches to be pushed by default
❯ git -C ds config --add remote.origin.push 'refs/heads/*'
# configure all tags to be pushed by default too
❯ git -C ds config --add remote.origin.push 'refs/tags/*'
# add a tag to the dataset
❯ git -C ds tag mytag
# push
❯ datalad push -d ds --to origin
publish(ok): . (dataset) [refs/heads/git-annex->origin:refs/heads/git-annex [new branch]]                      
publish(ok): . (dataset) [refs/heads/master->origin:refs/heads/master [new branch]]                            
publish(ok): . (dataset) [refs/tags/mytag->origin:refs/tags/mytag [new tag]]                                   

Other less "all-at-once" approaches should work in a similar fashion.

git version 2.39.1
datalad 0.18.3

@mih
Copy link
Contributor Author

mih commented May 5, 2023

Fix in #52 but was not closed

@mih mih closed this as completed May 5, 2023
@mih mih added the via-datalad-channel report origin is a datalad-specific channel (chat/email/office hour) label May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support-tracker Track a support event that occurred elsewhere via-datalad-channel report origin is a datalad-specific channel (chat/email/office hour)
Projects
None yet
Development

No branches or pull requests

1 participant