Trouble Using GIT/GitHub

I’ve managed to install GIT and create a repository and set up a GitHub account (RHH42). I’ve not been able to figure out how to add my CSS and HTML files to GitHub. I don’t even know if I have those files staged in the repo. What’s worse is that I don’t know how to check to find out.

I watched a couple of Microsoft YTs including the one on using VS Code to make a commit but I can’t make it work. When I drag a folder (css-practice, with contains the css file and the html index file) to the icon, I see indications onscreen that seem to indicate that the commit is working, but it never finishes. Furthermore, I have to close VS Code to make it stop.

Here’s a screenshot taken when the commit was in progress.

Would appreciate any help . . .

When I started using Git, GitHub in 2014 I was scared like hell and it took me few months to get comfortable with it.

Here are few recommendations to master it

  1. For first few months, always use command line only to do git, github related tasks
  2. I don’t recommend using any IDE during learning phase.
  3. Keep VSCode only for coding purpose
  4. This way you can learn all the basic commands of git and get super comfortable with it

Do watch this video few times and make notes, while practicing along

2 Likes

Thank you, vikramvi. I think VS Code is confusing me with GIT/GitHub.

Thanks for the link!!

Till today I don’t use any IDE for Git, always prefer command line itself.

Coming from IntelliJ IDEA world ( which I had used for many years ), VS Code is not UI/UX friendly IMO.

1 Like

Hi Vikramvi,
I took your advice and stopped trying to manage my GIT and github repos with VS Code. I’m using GIT Bash on Windows 10. This is forcing me to learn more about GIT and github; and while it slows me down a good bit trying to learn bits and pieces, I think I will eventually get to where I can use them faster without so many errors and without wondering if my learning problems are with VS Code or with GIT/GitHub.

Would you do me the favor of looking at my github account (RHH42) to see if you can see files there? There should be 2 in addition to the ReadMe file.

Also, how can I tell if my commit comments are in my github repo?

Thanks for good advice.

you can check these from your end as well, please visit Commits · RHH42/the-clan · GitHub and see all the necessary info.

Also I suggest to maintain GitHub as resume which can be used in future, so proper user name, bio, picture etc can be of great help to yourself.

My ex-CTO use to say git commits are like heart beats, if you’re not committing daily then you’re considered dead.

Thanks for the feedback. I didn’t know how to check commits.

1 Like

Don’t worry, keep using and keep practicing “daily” to get familiarized with all the GitHub, Git features.

2 Likes

Thank you for the video.

Thanks for your encouragement, vikramvi.

I found my problem, proving that even blind squirrels do find acorns. :smile:

Although the error messages didn’t indicate directly what the problem was, I discovered by searching error messages that my user.name might be wrong. The page that I saw this showed that I should use git config user.name "XXXX" to set it . Although I thought I did this when I installed and set up GIT, I did it again. That page also suggested that it should be set globally, ie, in my root directory which I’m pretty sure I did not do. I took care of that then did a git pull "the-clan" which worked. I was then able to push it which worked.

I’m posting my solution in case it helps someone searching for answers here.

Thanks, again, vikramvi!!

1 Like

The worst thing about the Git setup is you do it one time and forget about it. Then suddenly you are on a new system and you have to remember (you likely won’t) how to do it again. It is set and forget, but mostly just forget.

It’s always good to debug problem on your own ( Google + SO ) and see the confidence, satisfaction it gives to oneself.

Good job mate.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.