git - How to delete commits from bitbucket -
i accidentally pushed files .idea directory in django project had in .gitignore file. trying delete commit bitbucket repository since there else im working on project , can't pull changes without affecting own .idea files. have seen other questions use git revert, remember there command pushed last commit made, , after deleted master branch. example
commit history:
94ca48e
55fab05
3813803
i want delete 94ca48e, , 55fab05. there command found once make 3813803 current commit, , in remote repository after commit deleted, can't find anywhere.
use git reset --hard 3813803
. can not undone , works locally remote.
have @ git docu atlassian here.
let me quote there:
whereas reverting designed safely undo public commit, git reset designed undo local changes. because of distinct goals, 2 commands implemented differently: resetting removes changeset, whereas reverting maintains original changeset , uses new commit apply undo.
git reset
1 used here, though, because asking complete deletion.
Comments
Post a Comment