git command for recreate feature branch
git branch from tags
git branch mybranch001 tags/v1.0.0 git checkout mybranch001 git cherry-pick xxx git branch --set-upstream-to=origin/mybranch001 git push --force-with-lease
git branch from tags
git branch mybranch001 tags/v1.0.0 git checkout mybranch001 git cherry-pick xxx git branch --set-upstream-to=origin/mybranch001 git push --force-with-lease
- Without Get-Content
- Dynamic call/execute command
$text = "texthere"
$cmd = "Add-Content -Path C:\xxx.txt -Value ""$text"""
for ($i = 0; $i -lt 1000; $i++) { Invoke-Expression $cmd }
1. Setting AWS CLI Credential location : ~/.aws/credentials
[myuser]
aws_access_key_id = xxxx
aws_secret_access_key = xxxx
2. Setting AWS CLI Config location : ~/.aws/config
[profile myusermfa]
region = yourregion
role_arn = arn:aws:iam::xxAccountIDxx:role/xxRoleNamexx
source_profile = myuser
mfa_serial = arn:aws:iam::xxAccountIDxx:mfa/myuser
role_session_name = Session_MyUser_MFA
3. Access AWS CLI using profile
aws s3 ls s3:// --profile=myuser
Remove item in Windows via GUI will take some time because it will scan all files before delete.
To speed up time, we don't need to scan it.
One of fast method is using Powershell
Remove-Item -path ./* -recurse
aws s3api list-objects --bucket BUCKETNAME --prefix FOLDERNAME1/FOLDERNAME2/ --output json --query "Contents[?contains(Key, `SearchKeyword`)]"
aws s3api list-objects --bucket BUCKETNAME --prefix FOLDERNAME1/FOLDERNAME2/ --output json --query "[sum(Contents[?contains(Key, `SearchKeyword`)].Size), length(Contents[?contains(Key, `SearchKeyword`)])]"
aws s3api list-objects --bucket BUCKETNAME --prefix FOLDERNAME1/FOLDERNAME2/ --output json --query "[sum(Contents[].Size), length(Contents[])]"
.\devenv.exe /diff “C:\b.txt” “C:\a.txt” “SOURCE” “TARGET”