Tags

6 pages

Git

Git Single Configuration Proxy

Accessing GitHub domestically is slow, and you can speed it up by configuring a proxy. There’s also another way: find a domestic hosting platform like CodeOcean or Coding. Configure the corresponding build pipeline to sync your code to GitHub.

I’ve been using ‘coding’ for many years – its interface is simple, and they recently released an announcement that the free version can no longer be used, requiring migration to Tencent’s new platform, cnb. Let me also complain a bit about Alibaba’s hosting platform; the entire interface design feels very dated/stuffy. It’s like eating a bowl of congee (班味 - ban wei).

Git Submodule Merge History Lost

There’s a Git repository locally where submodules were in temporary branches during the initial pull. I made commits on that temporary branch, and then switched back to the main branch. However, those committed changes seem to be lost and cannot be found within the main branch. I also can’t find any record of that temporary branch.

Solutions

After committing to a temporary branch within the Git submodule and switching back to the main branch, these commits are no longer found. This situation can be resolved by following the steps below:

Git Disable HTTP Repository

Updated habit software version, unsure which Git version to start from, prohibiting fetching code from Http repositories.

fatal: Unencrypted HTTP is not supported for GitLab. Ensure the repository remote URL is using HTTPS

Background Introduction

Environment: Windows platform, I’ve always used Tiny Turtle to operate Git, and key configuration was also handled through it. I previously created a script to batch update local repositories. Previous article link: Batch Update Local Git Repository Today when I went home to execute the code update, the previous error occurred, and the repository could no longer be updated normally. I was planning to use Git’s configuration to continue using the http protocol to update the repository, but I searched everywhere without finding the corresponding configuration item. The simplest solution is of course to switch to the ssh protocol to update the repository, as the gitlab configured by the company will not provide the https protocol in the short term.

A Collection of Less Commonly Used Git Commands

Less commonly used, but very useful git commands

Reinstalling the system caused changes to folder ownership on Windows.

The new version of git has added security checks, prompting an unsafe state and preventing further operation.

git config --global --add safe.directory
git config --global --add safe.directory "*"

New Computer Saving Account Password Information

git config --global credential.helper store

If the saved information needs to be updated, first clear out the old credentials