This file contains hidden or 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
Locally: | |
``` | |
git checkout oldname | |
git branch -m "newname" | |
git push origin :oldname newname | |
git push origin -u newname | |
``` | |
In remote: |
This file contains hidden or 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
First create or update .gitignore File locally and run | |
`git rm --cached -r .` | |
`git add -A` | |
`git commit -m "Add gitignore"` | |
`git push` | |
Now on remote first upload the new gitfile **maually** and then run | |
`git rm --cached -r .` |
This file contains hidden or 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
# Dry run | |
git fetch origin master | |
git diff --name-status HEAD..origin/master | |
# Finally merge | |
git merge origin/master |
This file contains hidden or 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
find . -type f ! -iname ".gitignore" -delete | |
find . -empty -type d -delete |
This file contains hidden or 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
https\:\/\/(www.)?(domain.com\/?)\S*?(?=((\<br)|(\(\()| |$)) | |
Test https://www.regextester.com/ | |
======== REGEX ======== | |
\S*? | |
- ? is Lazy operator: Match as few characters as possible | |
(?=((\<br)|(\(\()| |$)) |
This file contains hidden or 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
##### Some linux commands to move biggest files | |
# Move 6 biggest files of current dir to "bigfiles" dir | |
ls --sort=size | head -n 6 | xargs -I{} cp {} ../bigfiles | |
# Only files with filename length of 14: |