An open API service indexing awesome lists of open source software.

https://github.com/shivajivarma/git


https://github.com/shivajivarma/git

git

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# git

## Configure mergetool
```bash
git config --global --add merge.tool kdiff3
git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add mergetool.kdiff3.trustExitCode false

git config --global --add diff.guitool kdiff3
git config --global --add difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add difftool.kdiff3.trustExitCode false
```

## Remember password for git
### Ubuntu
```bash
git config --global credential.helper cache
```

### Windows
```bash
git config --global credential.helper wincred
```

## Revert local commit without lossing changes
```bash
git reset --soft HEAD~1
```
## Delete local GIT branches that were deleted on remote repository
```bash
git fetch --all
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs git branch -d
```

__Note: You can use a capital “D” instead of “d” to force delete__

## Git checkout file from specific branch or commit
```bash
git checkout origin/master -- src\folder\file-name.js
```

## NPM version sign git tags
```bash
npm config set sign-git-tag true
npm version patch
```