-1

I push my commits by git bash (Windows11) everyday, but they are not show as contribution on my github.

I've read several artilces like this. I've checked my email address and it is already added in git.

I have no idea what is the problem, and I really hope my commits in the past days can show as conribution.

Hope anyone can help. Thank you very much!

My repository is https://github.com/frankychhoa/codeeveryday

torek
  • 448,244
  • 59
  • 642
  • 775
Isao
  • 11
  • 1
  • 3

2 Answers2

0

To push data using git bash follow the steps

open your project folder

right click and open gitbash

then follow the steps

git init
git status
git add .
git commit -m "uploading"

still you are in your local directory but wait before uploading check if you are connected to the remote reposetry or not

master/ main

git remote get-url origin
git remote get-url master

if you found not remote url then you can set it

git remote set-url origin <newurl>)

then follow the below steps to check you remote repostry is it main /orign

git push -u orign master
git push -u origin main 
0

All your commits are made by [frankychhoa] <[frankychhoa@gmail.com]> which is not normal syntax.

You probably just need to set your name and e-mail address correctly in your client (fix the actual name, I'm just guessing):

git config --global user.name "Franky Chhoa"
git config --global user.email "frankychhoa@gmail.com"

Running git log in your repo shows:

commit c961e52fe6 (HEAD -> main, origin/main, origin/HEAD)
Author: [frankychhoa] <[frankychhoa@gmail.com]>
Date:   Wed Sep 28 21:58:11 2022 +0900

    2022.09.28

...

But it's supposed to look like:

commit c961e52fe6 (HEAD -> main, origin/main, origin/HEAD)
Author: Franky Chhoa <frankychhoa@gmail.com>
Date:   Wed Sep 28 21:58:11 2022 +0900

    2022.09.28

...
joanis
  • 10,635
  • 14
  • 30
  • 40
  • Thanks for answering. After changing my user name, now my commit can show as contribution sucessfully. However, I would like to ask if it is possible to make my past commits show as contributions. Thank you for your kindness! – Isao Sep 29 '22 at 11:22
  • You can use `git filter-branch` for that. See https://stackoverflow.com/a/2931914/3216427 Basically, you have to rewrite the whole history and change the author on each commit, one commit at a time. Fortunately, there are tools to automate that! – joanis Sep 29 '22 at 12:29