Github is f***ed up.

hey I transferred all of my repos from Bitbucket to Github then realised that commits don't count(show up on my home page) because they don't have the author and email. then I found this bash trick to add email and author to all of my commits on a certain repo: git filter-branch --commit-filter 'GIT_AUTHOR_NAME="username"; GIT_AUTHOR_EMAIL="email"; git commit-tree "$@";' HEAD now Github counts the new commits but the old ones are not counted. I'v also checked manually that all of the commits on that repo have email and author. from this page I can say that they should be there on my home page: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile I've also found that I have not changed the committer name so this merging command helped me with that: rebase -r [the initial commit] --exec 'git commit --amend --no-edit --reset-author' but still... I waited 24h and still the board doesn't include the old commits, only the new ones. it seems that github doesn't refresh the contributions board??? I recently discovered that the commits have been changed the problem is that the date also has been changed the date where I rebased... in all of the commits which made them appear as day of 30+ commits LOL. I used this method to fix it: - I use the interactive rebase git rebase i HEAD~[the end of the repo] - then I change the commiter date for each one (not efficient though) GIT_COMMITTER_DATE="2022-10-01T19:00:00" git commit --amend --date="2022-10-01T19:00:00" the new problem is that now on the contributions board I see 100 commits in one day WTF. in the repo I only have 39 commits. but it seems like whenever I rebase it appends to the history. and the dates in my local git do not match the dates on github repo. and git says everything is up to date. my hands are hurting, this is exhausting 🤬
4 Replies
Halu
Halu•2y ago
is this really an issue worth valuing? if you want a green board just write a bot to make commits everyday and just wait it out… commit counts really dont mean anything, if anything its a sign of commit spam. meaningful history > spammy one if you want every change saved forever without thinking about the cleanliness/meaningfulness of ur history, then git is the wrong tool to begin with. thats what fossil scm is for
venego
venego•2y ago
lemme guess... you've two word in the question in you assumed that I want to spam the contributions board? I was working on this project where I was committing almost each day, and now it looks like... one day I found this project somewhere and I committed it chunk by chunk to github LOL. I mean... I still have the correct history of the repo on bitbucket but I decided to move away from it. that's how it got messed up in the first place.
Halu
Halu•2y ago
I think valuing the commit board is the issue. My activity is set to private, so i don’t even have a board. You can add a note that the project was ported in the readme, no one will care tho I’ll put that aside tho. rebase has —committer-date-is-author-date, tho amending the commit to change author may still update the date. alternatively, you can try to set the date manually when you amend. usually people will grab this from the log: git commit —amend —date="$(git log -1 —pretty=format:%aD)" if you add that, you might be able to do it you may also wish to include rebase branches, which can be done via git rebase -i —merge —rebase-merges=rebase-cousins startcommit^ i cant guarantee success, as i’ve never had to redate and reauthor a whole repo b4 (which sounds suspicious) there are some scripts out there that may help too, just search git-redate or git-reauthor
venego
venego•2y ago
oh some people do value that so I gotta play the game if you know what I mean. yh I think ama link to the old repo on Bitbucket. And skip all of this Github's non-sense. Well I think committing almost all of the commits in one day sounds more suspicious though LOL.
Want results from more Discord servers?
Add your server