0

I'm trying to push my changes as always I did but this time is trying to push all the folders that are outside the project and I don't know why

[Directories that is trying to add to the push] (https://i.stack.imgur.com/Edfc9.png)

[Directory where is all folders] (https://i.stack.imgur.com/5vQxR.png)

I deleted the repository and created a new one but it has the same problems

I used git remote -v to know if I'm in the right repository and yes I am.

What it tells me when I want to push

part of above picture ben then as TEXT:

PS C:\ecommercejib> git push --set-upstream origin main
To https://github.can/JuanIgnacioBe11avitis/ecommercejib
! [rejected]   main -Y main (non-fast-forward)
error: failed to push some refs to 'https://github.com/JuanIgnacioBe11avitis/ecommercejib'
hint : Updates were rejected because the tip of your current branch is behind
hint : its remote counterpart. Integrate the remote changes (e.g.
hint : 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
PS C:\ecommerjic>
Luuk
  • 12,245
  • 5
  • 22
  • 33
  • Seems like your user doesn't have the required permissions on the directories inside `ecommercejib`. – dan1st Jan 02 '23 at 18:39
  • But this is the second project I'm doing with React and for the first one I didn´t have this problems – user20911687 Jan 02 '23 at 18:41
  • You cannot "push folders". You can only push commits. – knittl Jan 02 '23 at 18:46
  • https://stackoverflow.com/search?q=%5Bgit%5D+undo+init+home – phd Jan 02 '23 at 18:47
  • You have a space between the closing bracket and opening parentheses which is why your links are not rendering correctly. – a2k42 Jan 02 '23 at 18:48
  • @dan1st It looks like those permission errors are because git is trying to access directories it shouldn't be. The `.git` hidden folder determines the root of your repo and if it is saying `../../something` then the root is two levels up from the current working directory. Look and see where this `.git` folder is. – a2k42 Jan 02 '23 at 18:54

0 Answers0