![]() You can do so with ls -lh and ls -lh some_pattern. Check how big each of your untracked files is.Check which files are not being version controlled (untracked) with git status.and similar commands, repeat the following cycle: Once you are able to roll back the offending commit, instead of running git add * or git add. ![]() # If you have enough disk space, then create a full backup # Check the full size of your project directory That is, do something like this: # Nagivate to the parent directory of your main_project Which is why I greatly advise that you create a local backup of your main_project directory before you dive into commands such as git reset, specially whenever you see the -hard option being suggested. However, maybe you tried other commands and it’s a bit more complicated than that. The main solution then is to use: git reset -soft HEAD~1 However, when you undo a commit, you can either fully wipe out any changes (wipe them out fully from your disk, not only git’s version control!) or undo the version control step but also keep your files intact. At that point, it’s best to undo your last git commit which is well described in this website. Ok, so what can you do at this point? Remember, this is the scenario where you just made that commit. Which given that we work with large data, happens frequently (even a PDF file can be that big!). But oops, GitHub complains that you are trying to commit files larger than 50 Mb and even grinds to a halt if they are larger than 100 Mb. They then do a commit such as git commit -m "added all files" and run git push to sync their files to GitHub. and version control every file in their project. One situation that I’ve frequently helped others with is when they use git add * or git add. Recurrent problem: you just commited a large file and can’t push to GitHub
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |