Skip to content

Instantly share code, notes, and snippets.

@rajaramtt
Last active October 19, 2021 20:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajaramtt/d1837dead89dcedb918c128c5a6a4075 to your computer and use it in GitHub Desktop.
Save rajaramtt/d1837dead89dcedb918c128c5a6a4075 to your computer and use it in GitHub Desktop.
12
# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH
# Add all the files:
git add -A
# Commit the changes:
git commit -am "Initial commit"
# Delete the old branch:
git branch -D master
# Rename the temporary branch to master:
git branch -m master
# Finally, force update to our repository:
git push -f origin master
https://stackoverflow.com/a/45371497/2575740
git reset --hard 'xxxxx'
git clean -f -d
git push -f
https://stackoverflow.com/a/56970242/2575740
rmdir /S your_directory - Windows
del -f "src/*"
del /S /F your_directory
git clone -b my-branch git@github.com:user/myproject.git
cd existing-project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin https://fdsfsdfasdfasdf
git push -u origin master
cd existing-project
git remote set-url origin afdsafasdfsdaf
git push -u origin --all
git push origin --tags
Once you delete the branch from the remote, you can prune to get rid of remote tracking branches with:
git remote prune origin
git config --unset user.password
ng generate module modules/upsell --route modules/upsell --module Upp-routing.module
git reset --hard
Unmerged paths:
opy commits from one branch to another?
git cherry-pick --no-commit 70e54483373
@rajaramtt
Copy link
Author

this.route.url.subscribe(() => {
this.isAddtoCartDisable = this.route.snapshot.firstChild.data.isAddtoCartDisable;
this.labelType = this.route.snapshot.firstChild.paramMap.get('labelType');
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment