#Git push doesnt work
64 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @dire lily! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
What is ‘failed to push some refs to’ error failed to push some refs to is a Git error that many developers frequently face. It occurs when a developer attempts to push committed code to an external git repository. The ability to push code stopped working suddenly, despite it working yesterday or the day before. […]
Problem: You want to push changes to GitHub, but you are rejected like so: $ git push To https://github.com/YOU/REPO.git ! [rejected] main -> main (fetch first) error: failed to push some refs...
seems to be fixed
@severe whale you maybe also have an idea how to set tags
or a good tutorial for it
git tag your_tag if you want to create a (simple) tag from your current revision
if you want to create a (simple) tag from a custom revision (e.g. commit hash or branch name), you can use git tag your_tag your_ref
you can also create annotated tags with a message
e.g. git tag -a -m "<Tag message>" your_tag
is it possible to reverse a push
There are commands to express that wish, but the git server isn't necessarily configured to allow users to do that
in what way?
I have 2 .idea files
i think the source code is not defined either
the code is fine its just the project structure
in git log I have the commited and pushed things
id like to revert everything
is there a command ?
I can see the commit I want
you can undo a specific commit by creating a new commit that does the opposite
using the git revert command
but idk what the problem with two .idea files is
it doesnt open the prjet everything is bricked
prjet?
you can also just delete the .idea directory and iml files and recreate it i guess
reverting would be better
do i need any hash to revert ?
like the hash of commit i want to revert
yeah
either hash or other ref
you can get the hashes with git log
and then just use git revert your_commit_hash
if you want to revert the last/top commit, you could use git revert HEAD
but that could be the wrong one
acea2287911b80203ebab70b07bd00c42134a2af
this is the hash
all i gotta do is
git revert acea2287911b80203ebab70b07bd00c42134a2af
?
apparently its reverted now i get this here
whenever I try opening the project
does this here look like a good project structure for you
when I try to run it
configure the output path?
fixed already
turns out another folder had became the root of my project
I just changed that folder and everything worked out flawlessly