github
github
Github 本地上更新库
|
Avoid password everytime
when uploading file is to big
|
ignore files
Cite: Git-scm
the name of the file: .gitignore
should keep in the home directory rather than the .git
directory
|
- An optional prefix “!” which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded.
- An asterisk “*” matches anything except a slash.
- A trailing “/" matches everything inside. For example, "abc/” matches all files inside directory “abc”, relative to the location of the .gitignore file, with infinite depth.
- A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, “a/**/b” matches “a/b”, “a/x/b”, “a/x/y/b” and so on.
Delete large files
|
Another way to solve the same problem
|
Git push with ssh
Documentation: Github
Follow the instructions from Github to generate a ssh public key first.
Be sure about add the email for config the user
Exp:
|
After that, copy the key into github.
You may still find that Username is needed for push.
According 2240, we need to change the type or remote link.
Enter your github repository page and select the ssh link to configure the local repository as follow and the problem shell be solved.
|
Re-base the Local by Deleting all Local Change
|
Reference: Cameron McKenzie
- The git stash command, which saves uncommitted changes and reset your workspace.
- The git reset command, which only touches tracked files.
- The git clean command, that deletes every untracked file.
Errors
fatal: in unpopulated submodule ‘.deploy_git’
fatal: in unpopulated submodule '.deploy_git' FATAL { err: { Error: Spawn failed at ChildProcess.task.on.code (/mnt/8A26661926660713/Github/Notes_BK/node_modules/hexo-util/lib/spawn.js:51:21) at ChildProcess.emit (events.js:198:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) code: 128 } } 'Something\'s wrong. Maybe you can find the solution here: %s' '\u001b[4mhttps://hexo.io/docs/troubleshooting.html\u001b[24m'
According to ChatGPT (this is a super genius! I can’t find this result anywhere!) The error message you provided is related to Hexo, a static site generator. It seems that there was an issue with a submodule named ‘.deploy_git’ in the Git repository you were working with.
This error occurs when there’s a problem with the Git submodule in your Hexo project, and it’s not able to be cloned. To resolve this issue, try the following steps:
|
These steps should resolve the issue with the Git submodule and allow you to continue using Hexo to generate your static site. If the issue persists, you may need to refer to the Hexo troubleshooting guide (https://hexo.io/docs/troubleshooting.html) for further assistance.