The post-update
Hook needs to create a new tag as per requirement and push the tag when a commit is pushed to master
.
The post-update
hook will look like this:
#!/bin/bash
git_tag=release-$(date "+%Y-%m-%d")
git tag $git_tag
git push origin
Once done, switch to master, merge the feature into master, and push from master.
Verify if the Hook triggered by fetching the tag git fetch --tags
.
Hi i have an same issue, i done it at least 20 times with diferent approaches but nothing is working …someone help pls?
This person has a worked solution for the problem. This one is mostly about doing it with care, since when you do the problem, the names of directories is randomized a bit, and you must get the get the names of those directories and git branches correct for the problem to pass.
Beyond that, it helps to show something you tried, putting your code into “code blocks” so our forum software displays your code correctly. Also, this problem needs to be done as user natasha (if you check the upstream and cloned git directory, you’ll see they belong to that user), and you need to have natasha’s git credentials set up globally like this as well, or the post-update hook will not run successfully and the grader will fail you:
git config --global user.name natasha
git config --global user.email [email protected]
as an example