How can I go to a specific commit and return it master?

3

I have errors in my code and I would like to be able to return to a commit specific and be able to return it master , how can I do it?

this is my commit

commit 70b0aecf7ee7bfb4864eab75e56ccd67426926f1
Author: emeery <[email protected]>
Date:   Tue Apr 3 23:48:28 2018 -0500

    cabecera estrategias
    
asked by Gerardo Bautista 05.04.2018 в 00:09
source

2 answers

3

First make a

git reset - - hard {commit}

Once the reset is done, to upload it as a master you must force the push, since in the remote one you have already raised some levels above that commit.

Git push - - force origin/master
    
answered by 05.04.2018 / 00:31
source
0

This should work: git reset --hard {id_commit} then you must do push to your repo: git push -f <remote> <branch>

    
answered by 05.04.2018 в 00:16