Remove accidently tracked files/folders from git and keep local.
$ git rm --cached -r <somedir/file/regex>Undo previous unpushed commits, keeping the changes, for better commit message.
$ git reset --soft HEAD~<number-of-commits-to-undo>Change last commit message.
$ git commit --amend -m "new commit message"Append to last commit on update commit message.
$ git add new_file.ext
$ git commit --amend -m "new commit message"Update branches to show newly created branches by others.
$ git remote update origin --prunehave you been silly and dont a hotfix off of the active base branch, and not off the prior release for a hot fix? i.e. based a branch on v4.5.0@dev, instead of v4.4.4@dev. can run interactive rebase, or this also seems to work:
git rebase --onto 'origin/v4.4.4@dev' 'origin/v4.5.0@dev'
# where git rebase --onto <to-correct-base> <from-incorrect-base>Installing from github repo with ssh
# version
# - commit: "{commit-id}"
# - branch: "{branch-name}"
# - release: "v{version-number}"
$ pipenv install -e git+ssh://[email protected]/{username}/{repo-name}.git@{version}#egg={package-name}upgrading one dependancy without the others:
- Figure out the version you want to install, in my case the latests
requests,25.2.1 pipenv install --keep-outdated 'requests==25.2.1'will just update to that version- verify
Pipfile.lockshows new version, thengit checkout -- Pipfileto revert to what you had before, in my caserequests = "*" - verify correct version is installed:
$ pipenv graph | ack requests# or grep