I am very unfamiliar with Github and wanted to just upload a file I was going to change the next day. I understand this is the repository file is what it’s called.
I wanted to have when I do something in VS code to that same project it will update or request an update to go through.
So I tried testing this and I have just ran into issues.
Sorry if this is very nooby I watched a video and thought 5 mins this will be done then I can get back to adding my own things to the project.
I am trying to update something in the main branch and it will not let me and I have no understanding of what issues are going on in the output as it is foreign to me.
Please can I get some guidance on the issue?
The code so far:
git pull –tags
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> main
I do not know how to even link them together to do push and pulls and have tried some git commands in the terminal and still nothing, it worked when I made a new branch but it did one file and not the one in the "main" folder branch
Error code 1
I just want to be able to update the main branch whenever I wanna add a new feature.
Also just tried git push -f orgin master and this shows
Error code after force push
>Solution :
- Create repository in github website. This is your remote copy
- Clone repository to your local machine.
- Open VS code in the directory of the repository.
- Create files, modify files.
- Commit changes in VS code UI.
- Push changes to remote.
- Pull or clone changes to other machine if necessary.