I was working on my project and for some reason git add . and git commit -m "message" and git push would not work. So I took my code and uploaded it to the repository. When I did so I ran git clone on the uploaded files and tried to continue my work. Now git push will not work. Its saying
On branch main Your branch and 'origin/main' have diverged, and have 8 and 1 different commits each, respectively. (use "git pull" to merge the remote branch into yours).
What have I tried and what am I expecting?
I have tried using git reset to a previous commit id and than running the git clone command off that reset repository.
I have tried looking up git rebase but I am working on one repository and not a branch.
I have tried looking at stackoverflow articles such as: When do you use Git rebase instead of Git merge?
I looked at this article: Going back to a previous commit in Github Desktop But I do not see how creating a new branch is going to fix this issue.
What I am running into is, I do not have branches, everything is stored in one remote repoistory. There is only supposed to be one repository. I have learned that not to upload code into the repository when things are working because this whole thing is a mess!
What I am expecting: I am hoping I can get my github to be at commit: 0ace80d Fixing Superuser AND after doing go be able to do git add . and git push.
https://github.com/strikeouts27/django_news_app/commit/0ace80daf934aff633111dddeee1a8a3f2f8b5d4
My GitHub Link: https://github.com/strikeouts27/django_news_app/commits/main
Question is there a way to look at a diagram of whats happening to my repository?
Git Rebase seems promising. It says however that I have unstaged changes. I run git reset to clear them but they will not clear out. I am looking into finding a way to clear them out.
https://www.w3docs.com/learn-git/git-rebase.html
git status output:
(base) andrewstribling@Andrews-MBP news % git status
On branch main Your branch and 'origin/main' have diverged, and have 10 and 1 different commits each, respectively. (use "git pull" to merge the remote branch into yours)
Changes not staged for commit: (use "git add/rm ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
    deleted:    ../../../../../.gitignore
    deleted:    ../../../../../.vscode/settings.json
    modified:   ../../../../../README.MD
    deleted:    ../../../../../accounts/__init__.py
    deleted:    ../../../../../accounts/admin.py
    deleted:    ../../../../../accounts/apps.py
    deleted:    ../../../../../accounts/forms.py
    deleted:    ../../../../../accounts/migrations/0001_initial.py
    deleted:    ../../../../../accounts/migrations/__init__.py
    deleted:    ../../../../../accounts/models.py
    deleted:    ../../../../../accounts/tests.py
    deleted:    ../../../../../accounts/urls.py
    deleted:    ../../../../../accounts/views.py
    deleted:    ../../../../../django_project/__init__.py
    deleted:    ../../../../../django_project/asgi.py
    deleted:    ../../../../../django_project/settings.py
    deleted:    ../../../../../django_project/urls.py
    deleted:    ../../../../../django_project/wsgi.py
    deleted:    ../../../../../manage.py
    deleted:    ../../../../../news/README.MD
    deleted:    ../../../../../news/accounts/__init__.py
    deleted:    ../../../../../news/accounts/admin.py
    deleted:    ../../../../../news/accounts/apps.py
    deleted:    ../../../../../news/accounts/forms.py
    deleted:    ../../../../../news/accounts/migrations/0001_initial.py
    deleted:    ../../../../../news/accounts/migrations/__init__.py
    deleted:    ../../../../../news/accounts/models.py
    deleted:    ../../../../../news/accounts/tests.py
    deleted:    ../../../../../news/accounts/urls.py
    deleted:    ../../../../../news/accounts/views.py
    deleted:    ../../../../../news/db.sqlite3
    deleted:    ../../../../../news/django_project/__init__.py
    deleted:    ../../../../../news/django_project/asgi.py
    deleted:    ../../../../../news/django_project/settings.py
    deleted:    ../../../../../news/django_project/urls.py
    deleted:    ../../../../../news/django_project/wsgi.py
    deleted:    ../../../../../news/manage.py
    deleted:    ../../../../../news/pages/__init__.py
    deleted:    ../../../../../news/pages/admin.py
    deleted:    ../../../../../news/pages/apps.py
    deleted:    ../../../../../news/pages/migrations/__init__.py
    deleted:    ../../../../../news/pages/models.py
    deleted:    ../../../../../news/pages/tests.py
    deleted:    ../../../../../news/pages/urls.py
    deleted:    ../../../../../news/pages/views.py
    deleted:    ../../../../../news/templates/base.html
    deleted:    ../../../../../news/templates/home.html
    deleted:    ../../../../../news/templates/registration/login.html
    deleted:    ../../../../../news/templates/registration/password_change_done.html
    deleted:    ../../../../../news/templates/registration/password_change_form.html
    deleted:    ../../../../../news/templates/registration/password_reset_complete.html
    deleted:    ../../../../../news/templates/registration/password_reset_confirm.html
    deleted:    ../../../../../news/templates/registration/password_reset_done.html
    deleted:    ../../../../../news/templates/registration/password_reset_form.html
    deleted:    ../../../../../news/templates/registration/signup.html
    deleted:    ../../../../../pages/__init__.py
    deleted:    ../../../../../pages/admin.py
    deleted:    ../../../../../pages/apps.py
    deleted:    ../../../../../pages/migrations/__init__.py
    deleted:    ../../../../../pages/models.py
    deleted:    ../../../../../pages/tests.py
    deleted:    ../../../../../pages/urls.py
    deleted:    ../../../../../pages/views.py
    deleted:    ../../../../../templates/base.html
    deleted:    ../../../../../templates/home.html
    deleted:    ../../../../../templates/registration/login.html
    deleted:    ../../../../../templates/registration/password_change_done.html
    deleted:    ../../../../../templates/registration/password_change_form.html
    deleted:    ../../../../../templates/registration/password_reset_complete.html
    deleted:    ../../../../../templates/registration/password_reset_confirm.html
    deleted:    ../../../../../templates/registration/password_reset_done.html
    deleted:    ../../../../../templates/registration/password_reset_form.html
    deleted:    ../../../../../templates/registration/signup.html
Untracked files: (use "git add ..." to include in what will be committed)
    ../../../../../.CFUserTextEncoding
    ../../../../../.DS_Store
    ../../../../../.Trash/
    ../../../../../.anaconda/
    ../../../../../.bash_history
    ../../../../../.bash_profile
    ../../../../../.bashrc.save
    ../../../../../.conda/
    ../../../../../.condarc
    ../../../../../.config/
    ../../../../../.continuum/
    ../../../../../.cups/
    ../../../../../.docker/
    ../../../../../.fly/
    ../../../../../.gitconfig
    ../../../../../.idlerc/
    ../../../../../.ipynb_checkpoints/
    ../../../../../.ipython/
    ../../../../../.jupyter/
    ../../../../../.lesshst
    ../../../../../.matplotlib/
    ../../../../../.mono/
    ../../../../../.npm/
    ../../../../../.pgadmin/
    ../../../../../.psql_history
    ../../../../../.python_history
    ../../../../../.ssh/
    ../../../../../.tcshrc
    ../../../../../.venv/
    ../../../../../.viminfo
    ../../../../../.vscode/argv.json
    ../../../../../.vscode/cli/
    ../../../../../.vscode/extensions/
    ../../../../../.xonshrc
    ../../../../../.zprofile
    ../../../../../.zsh_history
    ../../../../../.zsh_sessions/
    ../../../../../.zshrc
    ../../../../../Andrews_First_Jupyter_Notebook.ipynb
    ../../../../../Applications/
    ../../../../../Baseball_Databank/
    ../../../../../Codecademy_Resturant.sql
    ../../../../../DJANGO_Meetup/
    ../../../../.DS_Store
    ../../../../.localized
    ../../../../.ssh:config
    ../../../../6 Popular Data Analytics Certifications_ Your 2023 Guide _ Coursera_files/
    ../../../../Andrew Stribling Pathways.docx
    ../../../../Codecademy learn Data analyst.  copy.pdf
    ../../../../ID THEFT AFFIDAVIT FTC.pdf
    ../../../.DS_Store
    ../../../career/
    ../../../jupyter-data_scientist_salary_projects/
    ../../.DS_Store
    ../../data_job_salaries/
    ../.DS_Store
    ../mysite/
    ../news.zip
    ../../python/
    ../../../questions/
    ../../../resources/
    ../../../../Screen Shot 2023-08-21 at 10.49.51 PM.png
    ../../../../convert_csv/
    ../../../../keyboard-shortcuts-macos.pdf
    ../../../../kobe-angry-949098398.jpg
    ../../../../news/
    ../../../../../Django_Tutorial_Polls_App
    ../../../../../Documents/
    ../../../../../Downloads/
    ../../../../../Library/
    ../../../../../Movies/
    ../../../../../Music/
    ../../../../../Pictures/
    ../../../../../Pipfile
    ../../../../../Pipfile.lock
    ../../../../../Public/
    ../../../../../Untitled.ipynb
    ../../../../../anaconda3/
    ../../../../../andrew-board/
    ../../../../../code with ch1/
    ../../../../../django_for_beginners/
    ../../../../../djangodelights/
    ../../../../../get-pip.py
    ../../../../../gitignore
    ../../../../../jupyter.py
    ../../../../../mysite/
    ../../../../../placeholder.py
    ../../../../../project_env/
    ../../../../../python.py
    ../../../../../untitled.txt
    ../../../../../venv/
    ../../../../../welcome-to-docker/
