Skip to content

Instantly share code, notes, and snippets.

@gernotstarke
gernotstarke / find-changed-files-in-git.sh
Created October 22, 2015 16:25
find heavily changed files in git repository
git log --since="90 days ago" --pretty=format:"" --name-only | \
grep "[^\s]" | \
sort | uniq -c | \
sort -nr | head -10
@niksumeiko
niksumeiko / git.migrate
Last active May 13, 2024 15:34
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.