-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
102 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# cmd | ||
|
||
## Symlink | ||
|
||
Create a symbolic link e.g. for XAMPP's htdocs directory: | ||
|
||
```cmd | ||
mklink /D symlink-name c:\Users\user\data\git\project\ | ||
``` | ||
|
||
Note: The `/D` is there because we are linking to a directory. `symlink-name` is the name of the symbolic link. Finally, the path is where the symbolic link actually resolves to. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,84 @@ | ||
# Git | ||
|
||
## Setup | ||
|
||
### Git global setup | ||
|
||
git config --global user.name "Prename Name" | ||
git config --global user.email "email@example.com" | ||
|
||
Just remove the `--global` flag for local setup. | ||
|
||
### Create a new repository | ||
|
||
git clone https://user@github.com/user/repo.git | ||
cd repo | ||
touch README.md | ||
git add README.md | ||
git commit -m "add README" | ||
git push -u origin master | ||
|
||
### Existing folder | ||
|
||
cd existing_folder | ||
git init | ||
git remote add origin https://user@github.com/user/repo.git | ||
git add . | ||
git commit | ||
git push -u origin master | ||
|
||
### Existing Git repository | ||
|
||
cd existing_repo | ||
git remote add origin https://user@github.com/user/repo.git | ||
git push -u origin --all | ||
git push -u origin --tags | ||
|
||
### Update remote location | ||
|
||
```bash | ||
git remote rm origin | ||
git remote add origin <new-location> | ||
git branch --set-upstream-to=origin/master master | ||
``` | ||
|
||
### Stop tracking file | ||
|
||
```bash | ||
git update-index --assume-unchanged [path] | ||
``` | ||
|
||
## Remove password prompt | ||
|
||
Caution: this will store the password unencrypted on the disk! Only use if it's safe on your machine! | ||
|
||
git config credential.helper store | ||
|
||
## Sign/verify commits | ||
|
||
Use `git commit -S` by default for all commits | ||
|
||
git config --global commit.gpgsign true | ||
|
||
Set default key | ||
|
||
git config --global user.signingkey <key-id> | ||
|
||
## Tags | ||
|
||
### Add tag to specific commit | ||
|
||
git tag -a v[version] [hash] -m "your tag description" | ||
|
||
## Branches | ||
|
||
### Remove Branches | ||
|
||
git branch -d local-branch-name | ||
git remote prune origin | ||
|
||
## Submodules | ||
|
||
Pull all submodules of the current repository (as they will not automatically retrieved by a `git clone`) | ||
|
||
git submodule update --init --recursive | ||
# Git | ||
|
||
## Setup | ||
|
||
### Git global setup | ||
|
||
git config --global user.name "Prename Name" | ||
git config --global user.email "email@example.com" | ||
|
||
Just remove the `--global` flag for local setup. | ||
|
||
### Create a new repository | ||
|
||
git clone https://user@github.com/user/repo.git | ||
cd repo | ||
touch README.md | ||
git add README.md | ||
git commit -m "add README" | ||
git push -u origin master | ||
|
||
### Existing folder | ||
|
||
cd existing_folder | ||
git init | ||
git remote add origin https://user@github.com/user/repo.git | ||
git add . | ||
git commit | ||
git push -u origin master | ||
|
||
### Existing Git repository | ||
|
||
cd existing_repo | ||
git remote add origin https://user@github.com/user/repo.git | ||
git push -u origin --all | ||
git push -u origin --tags | ||
|
||
### Update remote location | ||
|
||
```bash | ||
git remote rm origin | ||
git remote add origin <new-location> | ||
git branch --set-upstream-to=origin/master master | ||
``` | ||
|
||
### Stop tracking file | ||
|
||
```bash | ||
git update-index --assume-unchanged [path] | ||
``` | ||
|
||
## Remove password prompt | ||
|
||
Caution: this will store the password unencrypted on the disk! Only use if it's safe on your machine! | ||
|
||
git config credential.helper store | ||
|
||
## Sign/verify commits | ||
|
||
Use `git commit -S` by default for all commits | ||
|
||
git config --global commit.gpgsign true | ||
|
||
Set default key | ||
|
||
git config --global user.signingkey <key-id> | ||
|
||
## Tags | ||
|
||
### Add tag to specific commit | ||
|
||
git tag -a v[version] [hash] -m "your tag description" | ||
|
||
## Branches | ||
|
||
### Remove Branches | ||
|
||
git branch -d local-branch-name | ||
git remote prune origin | ||
|
||
## Submodules | ||
|
||
Pull all submodules of the current repository (as they will not automatically retrieved by a `git clone`) | ||
|
||
git submodule update --init --recursive |
File renamed without changes.
File renamed without changes.
File renamed without changes.