Here, we're removing all files that are currently being ignored in .gitignore:
git rm -r --cached .
git add .
git commit -m "Removes all .gitignore files and folders"
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "[email protected]"
find . -name ".*" -print | |
# I don't know the MAC OS, but that is how you find them all in most *nix environments. | |
find . -name ".*" -exec rm -rf {} \; | |
# to get rid of them... do the first find and make sure that list is what you want before you delete them all. | |
# The first "." means from your current directory. Also note the second ".*" can be changed to ".svn*" or any other more specific name; the syntax above just finds all hidden files, but you can be more selective. I use this all the time to remove all of the .svn directories in old code. |
If you want to move your commits to an existing branch, it will look like this:
git checkout existingbranch
git merge master # Bring the commits here
git checkout master
git reset --keep HEAD~3 # Move master back by 3 commits.
git checkout existingbranch
The --keep
option preserves any uncommitted changes that you might have in unrelated files, or aborts if those changes would have to be overwritten -- similarly to what git checkout does. If it aborts, git stash your changes and retry, or use --hard
to lose the changes (even from files that didn't change between the commits!)
mvn spring-boot:run |
pod update && pod install |
Method 1: Undo commit and keep all files staged In case you just want to undo the commit and change nothing more, you can use
git reset --soft HEAD~;
source: https://bytefreaks.net/programming-2/how-to-undo-a-git-commit-that-was-not-pushed
_decodeJwt(String jwt) { | |
final parts = jwt.split('.'); | |
if (parts.length != 3) { | |
throw Exception('invalid token'); | |
} | |
final payload = _decodeBase64(parts[1]); | |
final payloadMap = json.decode(payload); | |
if (payloadMap is! Map<String, dynamic>) { | |
throw Exception('invalid payload'); |