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 --prune
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.lock
shows new version, thengit checkout -- Pipfile
to revert to what you had before, in my caserequests = "*"
- verify correct version is installed:
$ pipenv graph | ack requests
# or grep