Doing LFS file transfers to Atlassian BitBucket and attempting to run a diff and see no diffs #5752
Replies: 2 comments
-
Hey, I'm sorry you're having trouble. I'm not entirely sure what issue you're experiencing, but it sounds like you want to manage some I suppose the first caution I should give is that when you successfully manage files with Git LFS, when you run Also, in terms of your workflow, you're creating Git attributes entries with May I ask, why are you looking to use Git LFS in the first place? Are there limits on the size of the files you can push into your repository? If so, are there simpler ways you could divide up your Let me start with a simple example where you are creating new files:
At this point, any new files you create which match the
Now, if you examine what Git has stored for those files, you'll see the content has been replaced with Git LFS pointers, and that's what
If you want to compare the files, you need to compare the copies in the working tree where Git LFS has replaced the pointer files with the actual content:
If you change one of the files, and commit the change, that will alter the SHA256 OID value in the Git LFS pointer, and that's what
So if you're expecting to use Git LFS and be able to compare file content, you'll usually need to do that "manually" and not with Now I suspect that what you may be hoping to do is to use Git LFS with some pre-existing files in your Git history. As I noted, for that, you would want to run
So you might do something like this, to rewrite your Git history and convert all existing
But now your local Git repository will have a new commit history, different from your remote's. All If you're really happy with the results, and want to replace the remote's history (for all branches), you can use |
Beta Was this translation helpful? Give feedback.
-
chrisd, thank you so very much for taking your time to help me understand this! Your step by step was just what I needed, and you confirmed some questions as well. Perfect, you answered my issues and I thank you, bless you for your support!! |
Beta Was this translation helpful? Give feedback.
-
Greetings to all who venture here in hopes of assisting. I feel the need to apologize ahead of time if I have done something stupid. I have two (not huge) versions of a piece of software, it appears to me that I get them uploaded into BitBucket as all the commits and pushes threw no errors and the git log response I thought was good too. When I go to run the diff between my version 38 and 43, it does not return anything as if they are the same, they are not. I can provide this information from git log response:
commit 7c1b4d76fc230f1818d86e8d4f33665b97a6a159 (HEAD -> main, origin/main)
Author: Mary Lou Forsyth MaryLou.Forsyth@weidmann-group.com
Date: Thu May 16 15:02:52 2024 -0400
Version 43: TabLink_API.py
commit b8696357af4e7bf5727f3892d625799e80b4b159
Merge: 19c1721 d7af517
Author: Mary Lou Forsyth MaryLou.Forsyth@weidmann-group.com
Date: Thu May 16 14:45:31 2024 -0400
Merge branch 'main' of https://bitbucket.org/weidmann-it-dev/tablink_repository
Tablink API V38 being committed on 5-16-2024
commit 19c1721a27e21d31404b8a3dc4cc93024ff560f9
Author: Mary Lou Forsyth MaryLou.Forsyth@weidmann-group.com
Date: Thu May 16 14:13:24 2024 -0400
Version 38: TabLink_API.py
commit d7af517c745f06cb58edcbcdf3b8f3e40b418435
Author: MaryLou.Forsyth marylou.forsyth@weidmann-group.comDate: Thu May 16 18:04:13 2024 +0000
Initial commit
But when I do these (the first one should have worked) I get nothing (the second was just a stab):
git diff 19c1721a27e21d31404b8a3dc4cc93024ff560f9 7c1b4d76fc230f1818d86e8d4f33665b97a6a159 -- Tablink_API_V38.py Tablink_API_V43.py
M:\Git2_Repository>
M:\Git2_Repository>git diff b8696357af4e7bf5727f3892d625799e80b4b159 7c1b4d76fc230f1818d86e8d4f33665b97a6a159 -- Tablink_API_V38.py Tablink_API_V43.py
M:\Git2_Repository>
Here are my steps:
git init
git lfs install
git lfs track "Tablink_API_V38.py"
git add .gitattributes
git remote add origin https://bitbucket.org/weidmann-it-dev/tablink_repository.git
git checkout -b main
git add .
git status
git commit -m "Version 38: TabLink_API.py"
git fetch origin
git pull origin main --allow-unrelated-histories
git push origin main
git remote -v
git status
git lfs track "Tablink_API_V43.py"
git add .
git commit -m "Version 43: TabLink_API.py"
git fetch origin
git pull origin main --allow-unrelated-histories
git push origin main
So, I have been a long time user of BitBucket where its been great to just upload your python file and save it, when you wanted a new version just hit edit, delete the old and paste in the new version, then look at the diffs. I want to embrace this LFS process but I am not seeing where I am going so far off track. If anyone can give me a hint or point me to more documentation I have no problem plowing through docs to get the right answer, please help if you can and bless you!
Beta Was this translation helpful? Give feedback.
All reactions