To stage a file and name it executable at the same time you can use the following git command:
git add --chmod=+x <FILENAME>
Extremely Serious
To stage a file and name it executable at the same time you can use the following git command:
git add --chmod=+x <FILENAME>
To disable the restriction to clone files with very long name (i.e. include path and filename) use the following command:
git config --global core.longPaths true
To provide which ssl backend to use with git use the following syntax:
git config --global http.sslBackend <SSL_BACKEND>
The SSL_BACKEND token can potentially be openssl or schannel.
schannel uses the windows certicate store.
Example
git config --global http.sslBackend schannel
Variable | Description | Possible Values |
---|---|---|
GIT_CURL_VERBOSE | Tells Git to emit all the messages generated by that library. This is similar to doing curl -v on the command line. | 1 |
GIT_SSL_NO_VERIFY | Tells Git not to verify SSL certificates. | true |
GIT_TRACE | Controls general traces | 1, 2 or true |
GIT_TRACE_PACKET | Enables packet-level tracing for network operations. | true |
Pre-requisite
Procedures
git rebase -i master
pick < hash1 > < message1 > pick < hash2 > < message2 > pick < hash3 > < message3 > pick < hash4 > < message4 >
To
pick < hash1 > < message1 > squash < hash2 > < message2 > squash < hash3 > < message3 > squash < hash4 > < message4 >
For some reason, you have files with more than 1MB in total size to push to git respository by HTTP. You might be surprised that you cannot do it. This is because by default, git only posts to remote server via HTTP protocol with a maximum of 1MB. To remedy this, increase the http.postBuffer to 500MB (i.e. if you have to send files with 500MB total size) on client side like the following:
git config --global http.postBuffer 524288000
Reference
https://mirrors.edge.kernel.org/pub/software/scm/git/docs/git-config.html
For some reason we wanted to abort a current pending merge because maybe of some conflicts. We can use the following command:
git merge --abort
The location for git for windows credentials can be found in the Credential Manager of windows. You can use this manager to add, remove or delete a git credential.
This can be accessed from the Control Panel then click the User Accounts. From there, click Credential Manager.
Control Panel -> User Accounts -> Credential Manager
Normally the credential manager looks like the following:
git fetch upstream pull/<ID>/head:<NEW BRANCH>
Where the variables can be describe as the following:
<ID> | This is the associated code attached to the pull request. Normally has the following format #<ID> (e.g. #123) or see the format from step 1. |
<NEW BRANCH> | This is the unique desired branch name on your fork. |
git checkout <NEW BRANCH>
Ignoring files in git can be in the well known .gitignore file or in the .git/info/exclude file.
What's the difference between the two files?
File |
Description |
.gitignore |
Operates at the repository level and everyone is sharing this file. |
.git/info/exclude |
Operates at the local working directory (i.e. normally the root of the cloned repository) level and only you has this file. |
Exclude File
If .git/info/exclude file is present it must have the same formatting rule as the .gitignore file.
If the file to be ignored was already in the repository and you can still see it as modified. You can execute the following command:
git update-index --assume-unchanged <FILENAME>
Example:
git update-index --assume-unchanged config/database-config.xml
The reversal of this command is the following:
git update-index --no-assume-unchanged <FILENAME>
© 2023 Ron and Ella Wiki Page
Theme by Anders Noren — Up ↑
Recent Comments