使用 NetBeans 将更改推送到 GitHub 时出现问题
Issue with Pushing Changes to GitHub with NetBeans
我目前正在使用带有 GitHub 的 NetBeans 来保存我的项目。但是,我在提交更改时遇到了一些麻烦。它不断产生我无法解决的错误,即使在互联网上查找它们之后也是如此。我附上了错误的视频。
编辑:git status
打印:
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/Gluon-ipad-app-icon-76@2x.png
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/Gluon-ipad-app-icon-76@2x.jpeg
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/
编辑 2:新 git status
输出:
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/
视频关键部分展示:
首先检查 git 状态(在命令行中)如果您看到 pom.xml
未跟踪或本地修改:您可能需要先添加并提交它,然后再尝试拉取.
我目前正在使用带有 GitHub 的 NetBeans 来保存我的项目。但是,我在提交更改时遇到了一些麻烦。它不断产生我无法解决的错误,即使在互联网上查找它们之后也是如此。我附上了错误的视频。
编辑:git status
打印:
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/Gluon-ipad-app-icon-76@2x.png
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/Gluon-ipad-app-icon-76@2x.jpeg
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/
编辑 2:新 git status
输出:
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/
视频关键部分展示:
首先检查 git 状态(在命令行中)如果您看到 pom.xml
未跟踪或本地修改:您可能需要先添加并提交它,然后再尝试拉取.