git checkhout -b new_feature
git add feature.py
git commit
git push origin new_feature
<Merge on GitLab/git hub>
git checkout master
git fetch master
git reset --hard origin/master
git branch -d new_feature
git remote prune origin
git rename -i {HASH}
# edit commits
git commit --amend --author "Arnaud Dessein <[email protected]>"
git rebase --continue
git push origin -f
git branch branch_name --set-upstream-to origin/branch_name
pip list --outdated
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
Clone the package to develop in some code location
~/code/your_package $ git clone git://git-repository.git
Then go in your project that use this library and activate the virtual env
~/code/your_project $ source venv/bin/activate
(venv) ~/code/your_project $ cd ~/code/your_package
(venv) ~/code/your_package $ pip install -e .
Now your project used the project in ~/code/your_package
Follow this guide.
In short:
$ git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" \
--prune-empty --tag-name-filter cat -- --all
Then force push:
$ git push origin --force --all
After some time has passed and you're confident that git filter-branch had no unintended side effects, you can force all objects in your local repository to be dereferenced and garbage collected with the following commands (using Git 1.8.5 or newer):
$ git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
$ git reflog expire --expire=now --all
$ git gc --prune=now