Skip to content

Instantly share code, notes, and snippets.

View everttrollip's full-sized avatar
🏠
Working from home

Evert Trollip everttrollip

🏠
Working from home
View GitHub Profile
@everttrollip
everttrollip / remove-git-lfs.md
Last active November 18, 2024 17:42
Removing git lfs from (any) repository

So, it has been an interesting journey, but time to remove git-lfs. Here follows a summary of the approach I used to safely remove git-lfs,

  • commit & push everything
  • create a branch, something like fix/remove-lfs
  • remove hooks git lfs uninstall
  • remove lfs stuff from .gitattributes (open file, delete content - don't delete the file!)
  • list all lfs files, git lfs ls-files
  • run git rm --cached for each file
    • if your list is big, copy the contents into a file.txt
  • make sure you remove the number and asterik on each line, you only want the paths to the files
@everttrollip
everttrollip / github-to-bitbucket
Last active June 1, 2020 14:26 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket and maintaining synced updates
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone [email protected]:abc/myforkedrepo.git
cd myforkedrepo
** Make sure you do not create a README **
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync [email protected]:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"