How to reset HEAD of the git material

326 views
Skip to first unread message

Wojciech Oledzki

unread,
May 21, 2015, 7:55:31 AM5/21/15
to go...@googlegroups.com
We had some emergency hard reset (master branch) on one of our Git repositories, and now pipelines triggered from that master branch stopped working, as it tries to checkout the last known HEAD commit - which no longer exists :(

I've tried `grep` -ing for the git hash in go-server, found one folder inside `pipelines/flyweight/` and I've deleted it - didn't help.

Is there any way I can access "Material update sub-system (MDU)" and manually delete that master branch HEAD from it?

Voytek Solutions Ltd is a company registered in England and Wales.
Registered number: 9449603, VAT number: 206143743,
Registered office: Unit 11, Hove Business Centre Fonthill Road, Hove, East Sussex, BN3 6HA

Ashwanth Kumar

unread,
May 21, 2015, 7:59:43 AM5/21/15
to Wojciech Oledzki, go...@googlegroups.com
In my experience making another commit on the branch and re-triggering the pipelines has done the trick. 

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Ashwanth Kumar / ashwanthkumar.in

Wojciech Oledzki

unread,
May 21, 2015, 9:29:51 AM5/21/15
to go...@googlegroups.com, wojtek....@voytek.solutions, ashwan...@googlemail.com
Did'n help. Still failing on trying to start from the last known commit, which simply does not exist enymore.

```
Error performing command: 
--- Command --- 
git log --date=iso --pretty=medium 7e60a6df88cd278b225d4dd807ebd424215e3a5b.. 
--- Environment --- {} --- INPUT ---- --OUTPUT --- 
--- ERROR --- 
STDERR: fatal: Invalid revision range 7e60a6df88cd278b225d4dd807ebd424215e3a5b.. ---
```

I need to find a way to force edit that HEAD entry in go.cd's Material Update Sub-system :(

anyone??

Ashwanth Kumar

unread,
May 21, 2015, 9:35:01 AM5/21/15
to Wojciech Oledzki, go...@googlegroups.com
People from GoCD will not like this, but there's a hack you can do to circumvent the problem. Hopefully it still works in the latest version.

If you're material is something like - g...@github.com:foo/bar.git 
trying changing any one character in the material url - g...@Github.com:foo/bar.git 

The github names are not case-sensitive but MDU material names are. This will come out as a new material for your pipeline according to Go so your current HEAD will be taken. 

Wojciech Oledzki

unread,
May 21, 2015, 9:41:26 AM5/21/15
to go...@googlegroups.com, wojtek....@voytek.solutions, ashwan...@googlemail.com
Thanks - it did the trick!

...but I still want to clean the original material's HEAD, in case someone will try to reuse that repo in another pipeline.

srinivas upadhya

unread,
May 21, 2015, 1:10:01 PM5/21/15
to go...@googlegroups.com, wojtek....@voytek.solutions
Sadly that's not possible. I think we should have a page for materials where users (admins) are able to retrigger "get latest revision" rather than "get latest revision since". Can you create a github issue for this?

Wojciech Oledzki

unread,
May 22, 2015, 3:26:01 AM5/22/15
to srinivas upadhya, go...@googlegroups.com

Done, #1145

-- 
Wojtek Oledzki
t: 07972.482.670 w: http://voytek.solutions

Voytek Solutions Ltd is a company registered in England and Wales.

Registered number: 9449603


Registered office: Unit 11, Hove Business Centre Fonthill Road, Hove, East Sussex, BN3 6HA

On 21 May 2015 18:10, "srinivas upadhya" <srinivas...@gmail.com> wrote:
Sadly that's not possible. I think we should have a page for materials where users (admins) are able to retrigger "get latest revision" rather than "get latest revision since". Can you create a github issue for this?

Reply all
Reply to author
Forward
0 new messages