Issue
I am currently using NetBeans with GitHub to save my project. However, I've been having some trouble committing the changes. It keeps producing errors that I have been unable to solve, even after looking them up on the internet. I have attached a video of the errors.
href="https://user-images.githubusercontent.com/79435335/132960447-f1eb2bfc-9a7a-45ec-b31d-1cf4ead62192.mp4" rel="nofollow noreferrer">Video of the Errors
Edit: git status
prints:
On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: pom.xml
new file: runPom.xml
modified: src/ios/Default-Info.plist
new file: src/ios/assets/Assets.xcassets/AppIcon.appiconset/[email protected]
modified: src/ios/assets/iTunesArtwork
modified: src/ios/assets/iTunesArtwork@2x
renamed: src/main/java/com/mysecondapplication/DrawerManager.java -> src/main/java/com/superpengoo/DrawerManager.java
renamed: src/main/java/com/mysecondapplication/MySecondApplication.java -> src/main/java/com/superpengoo/Therabot.java
renamed: src/main/java/com/mysecondapplication/utils/BrowseUtils.java -> src/main/java/com/superpengoo/utils/BrowseUtils.java
renamed: src/main/java/com/mysecondapplication/views/OctonaryView.java -> src/main/java/com/superpengoo/views/OctonaryView.java
renamed: src/main/java/com/mysecondapplication/views/PrimaryView.java -> src/main/java/com/superpengoo/views/PrimaryView.java
renamed: src/main/java/com/mysecondapplication/views/QuaternaryView.java -> src/main/java/com/superpengoo/views/QuaternaryView.java
renamed: src/main/java/com/mysecondapplication/views/QuinaryView.java -> src/main/java/com/superpengoo/views/QuinaryView.java
renamed: src/main/java/com/mysecondapplication/views/SecondaryView.java -> src/main/java/com/superpengoo/views/SecondaryView.java
renamed: src/main/java/com/mysecondapplication/views/SenaryView.java -> src/main/java/com/superpengoo/views/SenaryView.java
renamed: src/main/java/com/mysecondapplication/views/SeptenaryView.java -> src/main/java/com/superpengoo/views/SeptenaryView.java
renamed: src/main/java/com/mysecondapplication/views/Session.java -> src/main/java/com/superpengoo/views/Session.java
renamed: src/main/java/com/mysecondapplication/views/Sessions.java -> src/main/java/com/superpengoo/views/Sessions.java
new file: src/main/java/com/superpengoo/views/Subsession.java
renamed: src/main/java/com/mysecondapplication/views/TertiaryView.java -> src/main/java/com/superpengoo/views/TertiaryView.java
modified: src/main/resources/META-INF/native-image/jni-config.json
modified: src/main/resources/META-INF/native-image/reflect-config.json
modified: src/main/resources/META-INF/native-image/resource-config.json
modified: src/main/resources/META-INF/native-image/serialization-config.json
renamed: src/main/resources/com/mysecondapplication/style.css -> src/main/resources/com/superpengoo/style.css
renamed: src/main/resources/com/mysecondapplication/views/octonary.css -> src/main/resources/com/superpengoo/views/octonary.css
renamed: src/main/resources/com/mysecondapplication/views/primary.css -> src/main/resources/com/superpengoo/views/primary.css
renamed: src/main/resources/com/mysecondapplication/views/quaternary.css -> src/main/resources/com/superpengoo/views/quaternary.css
renamed: src/main/resources/com/mysecondapplication/views/quinary.css -> src/main/resources/com/superpengoo/views/quinary.css
renamed: src/main/resources/com/mysecondapplication/views/secondary.css -> src/main/resources/com/superpengoo/views/secondary.css
renamed: src/main/resources/com/mysecondapplication/views/senary.css -> src/main/resources/com/superpengoo/views/senary.css
renamed: src/main/resources/com/mysecondapplication/views/septenary.css -> src/main/resources/com/superpengoo/views/septenary.css
renamed: src/main/resources/com/mysecondapplication/views/tertiary.css -> src/main/resources/com/superpengoo/views/tertiary.css
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: src/ios/assets/Assets.xcassets/AppIcon.appiconset/[email protected]
Untracked files:
(use "git add <file>..." to include in what will be committed)
.DS_Store
src/.DS_Store
src/ios/.DS_Store
src/ios/assets/.DS_Store
src/ios/assets/Assets.xcassets/.DS_Store
src/ios/assets/Assets.xcassets/AppIcon.appiconset/.DS_Store
src/main/.DS_Store
src/main/java/.DS_Store
src/main/java/com/.DS_Store
src/main/java/com/superpengoo/.DS_Store
src/main/resources/.DS_Store
src/main/resources/META-INF/.DS_Store
src/test/
target/
Edit2: new git status
output:
On branch master
Your branch and 'origin/master' have diverged,
and have 3 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.DS_Store
src/.DS_Store
src/ios/.DS_Store
src/ios/assets/.DS_Store
src/ios/assets/Assets.xcassets/.DS_Store
src/ios/assets/Assets.xcassets/AppIcon.appiconset/.DS_Store
src/main/.DS_Store
src/main/java/.DS_Store
src/main/java/com/.DS_Store
src/main/java/com/superpengoo/.DS_Store
src/main/resources/.DS_Store
src/main/resources/META-INF/.DS_Store
src/test/
target/
nothing added to commit but untracked files present (use "git add" to track)
superpengooooo@Ariettas-MacBook-Pro Therabot % git add
Nothing specified, nothing added.
hint: Maybe you wanted to say 'git add .'?
hint: Turn this message off by running
hint: "git config advice.addEmptyPathspec false"
superpengooooo@Ariettas-MacBook-Pro Therabot % git add .DS_Store
src/.DS_Store
src/ios/.DS_Store
src/ios/assets/.DS_Store
src/ios/assets/Assets.xcassets/.DS_Store
src/ios/assets/Assets.xcassets/AppIcon.appiconset/.DS_Store
src/main/.DS_Store
src/main/java/.DS_Store
src/main/java/com/.DS_Store
src/main/java/com/superpengoo/.DS_Store
src/main/resources/.DS_Store
src/main/resources/META-INF/.DS_Store
src/test/
target/
zsh: permission denied: src/.DS_Store
zsh: permission denied: src/ios/.DS_Store
zsh: permission denied: src/ios/assets/.DS_Store
zsh: permission denied: src/ios/assets/Assets.xcassets/.DS_Store
zsh: permission denied: src/ios/assets/Assets.xcassets/AppIcon.appiconset/.DS_Store
zsh: permission denied: src/main/.DS_Store
zsh: permission denied: src/main/java/.DS_Store
zsh: permission denied: src/main/java/com/.DS_Store
zsh: permission denied: src/main/java/com/superpengoo/.DS_Store
zsh: permission denied: src/main/resources/.DS_Store
zsh: permission denied: src/main/resources/META-INF/.DS_Store
zsh: permission denied: src/test/
zsh: permission denied: target/
Solution
The key part of the video shows:
Check first with a git status (in command line) if you see pom.xml
as untracked, or locally modified: you might need to add and commit it first, before attempting your pull again.
Answered By - VonC
Answer Checked By - Candace Johnson (JavaFixing Volunteer)