Category Archives: Git (en)
Git: How to Prevent a Repository Branch from Being Published
Sometimes, you need to keep a branch private, and to protect yourself from accidentally clicking ‘Publish Branch,’ it’s a good idea to prevent its publication. On Windows, you can do it like this… In the folder .git/hooks, create a file … Continue reading
Properly moving git history to a new branch
I needed to optimize the history of my first repository (a fork of another rep), which (of course) was very buggy. Over 3 years a lot of garbage had accumulated there; there was data that shouldn’t be there and hundreds … Continue reading
Github: how to update a fork
Sometimes you fork a turnip for every firefighter (they sometimes delete it; we know, they passed ..) and you forget about it. But they write something in it, update it – you need to update yours too. The easiest way … Continue reading
Storing binaries on GitHub
I’ll tell you what to do if you are forced to store binaries on github. The problem is that they often do not start when Windows downloads from there with a .zip archive (link like https://github.com/[user]/[repo] /main.zip ). To solve … Continue reading
GitHub: How to clone a specific branch
If you’re just getting started with GitHub and using the web interface or GitHub Desktop, doing something as simple as cloning a specific branch of a repository can be quite a challenge. You can do this with Git Bash: git … Continue reading
Git – exclude file for local repository
This is not taught in school (note to yourself). To calmly work with a fake turnip locally, without hurting your wounds .. Go to the git folder and look for the “exclude” file there: \.git\info\exclude we write paths there, for … Continue reading
Github: learning to work with a fork correctly
Sooner or later in the life of every mmm … Malthusian, let’s say .. there comes a moment when you need to learn how to work with the Git like a human being. In particular, engage in gardening – grow … Continue reading
WinMerge + Git = mergetool
I have been using the wonderful WinMerge tool for a long time, and I wish you the same. And now it’s time to merge conflicts on the git .. and the built-in tools or any alternative Git GUI turned out … Continue reading
The unauthenticated git protocol on port 9418 is no longer supported
Found out that git pull stopped working today. Gives an error message: The unauthenticated git protocol on port 9418 is no longer supported Solution First, let’s check where our git is knocking: git remote -v If you see the error … Continue reading
Git-sheet
git clone https://github.com/<my_username>/<fork>.git git status git log git hist q exit log/hist git remote -v git remote add upstream git://github.com/<user>/<repka>.git git branch <branch_name> git checkout <branch_name> git add <file_name> git commit -m “<comment>” git push -f origin <branch_name> gitk