This is an old revision of the document!
git log --all -- path/to/file.ext
git reflog show --date=iso origin/master
git log --abbrev-commit --pretty=oneline 228d0ae de36d78 git log --pretty=oneline 228d0ae de36d78
git show d9ekhg9alk239d94dkd949dksc0dkgkls90fds93
git show d9ekhg9alk239d94dkd949dksc0dkgkls90fds93 | head -6
git show d9ekhg9alk239d94dkd949dksc0dkgkls90fds93 | grep "^diff --git"
git tag new old git tag -d old git push origin :refs/tags/old git push --tags
The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.
Ensure that the other developers/users remove the deleted tag by running the following command:
git pull --prune --tags
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
git checkout master
git rebase upstream/master
Alternately, you could do a git merge upstream/master
, but a rebase is most sane, especially for keeping pull requests well-behaved
if [ "$refname" == "refs/heads/master" ]; then if [ "$USER" != "<someadminuser>" ]; then echo "POLICY: you are not allowed to change the master branch !" exit 1 else echo "POLICY: $USER allowed to change the master branch ..." fi fi
git config receive.denyCurrentBranch ignore
git symbolic-ref HEAD refs/heads/thebranch
apt install software-properties-common
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
apt install git-lfs
git lfs install
Links: Tech Info … Devops Info