Any programmers here? I need help!

I’m suppose to learn how to use git and GitHub, but I’m having problems with terminal. I’m going to paste this in a comment below, please tell me what I’m doing wrong, and how I can fix it. when I git status it tells me that there’s nothing to commit, but I have my whole memory game project that I’m sure I commited

On branch master

No commits yet

Untracked files:
(use “git add …” to include in what will be committed)

.DS_Store
css/
images/
index.html
js/

nothing added to commit but untracked files present (use “git add” to track)

Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config --global user.name "Your Name"
git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

git commit --amend --reset-author

11 files changed, 202 insertions(+)
create mode 100644 .DS_Store
create mode 100644 css/style.css
create mode 100644 images/.DS_Store
create mode 100644 images/back.png
create mode 100644 images/fingerpoint.png
create mode 100644 images/king-of-diamonds.png
create mode 100644 images/king-of-hearts.png
create mode 100644 images/queen-of-diamonds.png
create mode 100644 images/queen-of-hearts.png
create mode 100644 index.html
create mode 100644 js/main.js
User-MBP:memory_game user$ git push origin master
fatal: ‘origin’ does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Users-MBP:memory_game usernameishere$ git status
On branch master
nothing to commit, working tree clean
Users-MBP:~ username$ cd fundamentals
Users-MBP:fundamentals username$ cd memory_game
Users-MBP:memory_game username$ ls -a
. .DS_Store css index.html
… .git images js

Users-MBP:memory_game username$ git init
Reinitialized existing Git repository in /Users/username/fundamentals/memory_game/.git/
Users-MBP:memory_game username$ git status
On branch master
nothing to commit, working tree clean

bumpin to help this man

1 Like

The only thing I can help you with is that you use these command in your cmd from opening it on github desktop app.

git config --global user.name "Your Name"
git config --global user.email you@example.com
git commit --amend --reset-author

Also when working on a project make sure that your in your develop branch when editing your code. If your in the master you could mess everyone elses project files (if this is a team project).
Hope this kinda helps you :+1:

1 Like

You’re better off asking this question on a site like https://stackoverflow.com/ - there’s a community full of developers there that would be happy to help.

1 Like

@jennifer @Angelo.Destro @triagonal

Thank you guys for your time, I really appreciate it!

1 Like

There are many programmers in the community, they will help you solve your problem

1 Like

Thanks, again! Someone responded with some excellent help. I owe you a taco!

Oh my… this is worse than learning another language

1 Like

I will kindfully disagree. I don’t think that Stack Overflow is a good option for communication issues, but it’s good for looking at former solutions. It’s too tough to grow on that site and a lot of the times people will say things like ‘we can’t help as it’s not a free coding service’ or things like that. Just my opinion tho.

1 Like

If you haven’t solved your problem yet, I think it may be that you haven’t added your file changes. In general, there’s really only about four commands you need to memorize.

  • git init
    • You’ve already done this
  • git add .
    • Add all the changes you’ve made to your current directory— the . means current folder, so make sure you’re currently looking at the root of the folder you’re looking to “upload”, and not some random subdirectory in there
  • git commit -m "Fixed typos"
    • Where you can talk about the changes you’ve made. If you have a lot to say about your changes, I recommend using git commit -a instead, but this will most likely open the vi editor, which can be confusing.
  • git push
    • pushes your commits to github/wherever your remote points.

If you haven’t setup where it should upload to (aka if you haven’t given it the url your github repo), you can do the following:

  • git remote -v
    • If you don’t see a link to your repo here, it means you have to add it. See below.
  • git remote add origin https://github.com/username/reponame.git
    • now try the above command again, and you should see it there.
    • go ahead and git push, now that it knows where to “upload” to.

In general, this is a very good tutorial if you want to get better at git. Actually, that whole website has a lot of good tutorials. If you’re a more visual learner though, youtube should be able to help you there.

Hope this helped :slight_smile:

1 Like

IVE DONE IT! And thank you guys you’ve all helped a lot, I had to switch in between coding my project and going back to terminal so I can figure it out and Finally push it to github.

@rmd Thank you!

@amelia :joy::joy::joy: