table of content

# remove node_modules from git cache

echo '**/node_modules' >> .gitignore
git rm -r --cached node_modules
git add .
git commit -m 'remove gitignore folder node_modules'
git push -f

# or
git push origin master

# update the ref for remote

git remote update --prune 

# show remote branch with author name

git for-each-ref --sort=committerdate --format='%(committerdate) %09 %(authorname) %09 %(refname)' refs/remotes 

# delete remote branch

git push origin --delete feature/branch-name

# push local branch to remote

git push -u origin feature/branch-name 

# multiple remote repository / refers

# list the remote refers
git remote -v
# add the 2.nd remote refer to the origin
git remote set-url --push --add origin https://github.com/SchwarzIT/siam-oauth2-bundle.git
git push # will trigger to push the changes to multiple remote refers

# change the date of last commit

git commit --amend --no-edit --date "Sun 17 Jan 2021 20:19:19 BST"
# or change the author and the date
git commit --amend --no-edit --author="vikbert <segentor@gmail.com>" --date "Fr 26 July 2021 20:19:19 BST"
git push
Last Updated: 10/3/2021, 12:45:42 AM