git ls-files . --ignored --exclude-standard --others
git ls-files . --exclude-standard --others
git reset --hard
git checkout -- file.php
git add path/file.txt
git rm file
git rm -rf files
git checkout -- <file>
$ git checkout <commit_hash> -- <file>
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
[diff]
tool = kdiff3
guitool = kdiff3
[difftool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
[core]
editor = c:/Program Files (x86)/Subtitle Edit/SubtitleEdit.exe
KDiff3 download.
git mergetool
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
nano authorized_keys
chmod 644 authorized_keys
cat ~/.ssh/id_ed25519.pub
git config --global user.name "John Doe"
git config --global user.email [email protected]
# Designers
*.psd
#OS junk files
[Tt]humbs.db
*.DS_Store
# Sync Tools
sync.ffs_db
# Damn dreamweaver
*_notes/
# Builds
/build/OTAInstall
/build/StandardInstall
# Config files
config.php
config.json
Host bitbucket.org
HostName altssh.bitbucket.org
Port 443
git commit -m 'Info'
git push origin master
# New branch
git checkout -b gh-pages
# Switch to existing branch
git checkout gh-pages
git merge master
git push origin gh-pages
git checkout master
- Go to the gh-pages branch
- Bring gh-pages up to date with master
- Commit the changes
- Return to the master branch
git checkout gh-pages
git rebase master
git push origin gh-pages
git checkout master
git branch
git branch -r
git branch -a
git checkout -b <newbranch>
git push origin <branch>
git checkout <branch>
git format-patch HEAD~
git am commit-name.patch
npm login
git commit -m "Blah"
git tag v0.1.0
git push origin master --tags
npm publish
Source: https://codeburst.io/how-to-create-and-publish-your-first-node-js-module-444e7585b738
Create a patch and applying
diff -Naur original modified > patch.txt
patch original < patch.txt
Create, apply and undo
diff -u OriginalFile UpdatedFile > PatchFile
patch OriginalFile < PatchFile
patch -R OriginalFile < PatchFile
Source: https://www.shellhacks.com/create-patch-diff-command-linux/