Posts

Showing posts with the label Git

Git - How to revert, cancel last changes on remote server

Sometimes you do something wrong. For example, push to master branch dev commits or something else, what does not have to find itself here.  There are present a lot of official recommends how to push revert commits... but honestly, in my case, it does not work in proper way, as you want. So, I found ferroconcrete method how to solve this issue. But it seems to somebody not gracefully, but it works at least. First step: Revert to required commit.  git reset --hard <commit-hash> (This command will reset the branch to the specified commit. Be cautious when using --hard as it will discard changes in your working directory and staging area.) Second step: Create new branch from this point.  git checkout -b <new-branch-name> (This command creates a new branch and switches to it. Replace <new-branch-name> with the desired name for your new branch.) Third step: Remove your damaged branch on server. git push origin --delete <branch-name> (Replace <br...

Ubuntu 16.04 - не работает git

Сегодня случился крайне странный баг, после обновления моей старой Ubuntu с 14.04 до 16.04 у меня перестал работать git fetch и git push. Хотя новые ветки создавались и я мог переключиться между ними. Мне git выдавал какую-то странную ошибку: "git-remote-https: relocation error: /usr/lib/x86_64-linux-gnu/libgnutls.so.30: symbol asn1_der_decoding2, version LIBTASN1_0_3 not defined in file libtasn1.so.6 with link time reference" После долгого гугления я таки нашел причину: joxi! я не знаю как это связано, но после удаления его, все заработало: sudo apt-get remove joxi Надеюсь кому-то это тоже пригодится. Подумал и решил перевести для наших англоязычных друзей :) If you catch a bug with broken git on Ubuntu 16.04 then just remove "joxi" from your PC: sudo apt-get remove joxi It should help :)