mixture of these:
- https://help.github.com/articles/importing-a-git-repository-using-the-command-line/
- https://help.github.com/articles/changing-author-info/#platform-linux/
mixture of these:
# Set git to use the credential memory cache git config --global credential.helper cache # Set the cache to timeout after 1 hour (setting is in seconds) git config --global credential.helper 'cache --timeout=3600'
#!/bin/sh
clear
for d in `find . -name .git | sed -e 's|^./||' -e 's|/.git$||' | grep -v '/'`; do
echo
cd $d
echo "================================================="
pwd
git pull
git st
cd -
done
git filter-branch --commit-filter \
'if [ "$GIT_AUTHOR_NAME" = "OLD-NAME" ]; then \
export GIT_AUTHOR_NAME="NEW-NAME";\
export GIT_AUTHOR_EMAIL=NEW-EMAIL;\
export GIT_COMMITTER_NAME="NEW-NAME";\
export GIT_COMMITTER_EMAIL=NEW-EMAIL;\
fi;\
git commit-tree "$@"'
git config user.name "NEW-NAME"; git config user.email "info@..."
git rm --cached mylogfile.log
git config core.filemode falsemore infos here: https://www.kernel.org/pub/software/scm/git/docs/git-config.html
git config --global alias.st status git config --global alias.co checkout git config --global alias.ci commit git config --global alias.di diff git config --global alias.br branch git config --global color.diff never
sample: git co -b newbr emacs ... git ci -am ... git co master git merge newbr git br -d newbr git checkout# switch to branch git checkout -b # create new topic branch (and switch) git branch -a # list all branches (local+remote) git checkout master git merge # merge other into master git branch -d # delete local branch git push origin --delete # delete remote branch
git diff master..staging # diff two branches git diff --name-status master..staging # show diffing files
git log --graph --decorate --oneline git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
git diff ignores owner/group #repository local: git config core.filemode falsemore infos here: https://www.kernel.org/pub/software/scm/git/docs/git-config.html