-2

I have added a folder on my mac to the GitHub folder repository and now I have a problem with committing.

On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
    modified:   iOS-Dev-2.0/Xcodes Tutorial/.DS_Store
    modified:   iOS-Dev-2.0/Xcodes Tutorial/first-full-app-window-shopper-source (modified content, untracked content)
    modified:   iOS-Dev-2.0/Xcodes/Test01/Test_01 (modified content)

no changes added to commit (use "git add" and/or "git commit -a")

I tried a few things via terminal first of all cd iOS-Courses - this is the directory where iOS-Dev-2.0 is stored git add * git push origin master

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
drebin96
  • 156
  • 1
  • 13
  • 2
    And what is the problem you have? – mkrieger1 Aug 10 '21 at 09:15
  • Does this answer your question? [Why does 'git commit' not save my changes?](https://stackoverflow.com/questions/7704480/why-does-git-commit-not-save-my-changes) – Joe Aug 10 '21 at 09:51

2 Answers2

2

The error/ warning message itself tells you the further steps.

You need to add the changes into staging area using git add command. then perform commit operation with your commit message using git commit -m "your commit message" command.

Git works as distributed version control system where for every code you have local copy and you perform all the operations such as add/remove/stash/commit. Unless you commit and push (literally push into remote repository) the changes are only on your machine.

May be you need to take a look at how git basic operations works.

  1. Saving changes
  2. git commit
Sangam Belose
  • 4,262
  • 8
  • 26
  • 48
1

You need to commit before pushing anything.

add add your changes/files to the index/stage that will be put in the commit.

Cyrille Pontvieux
  • 2,356
  • 1
  • 21
  • 29