Need help on git pushing a C# project
When I first uploaded my project on github, I've done it using the website's file adding. It seemed pretty dumb and tedious to select all the files one by one, so I wish to upload the whole project folder this time, thanks for your help.
Existing project that I wish to update:
https://github.com/TheHyper-Dev/Call-of-Duty-Movement-in-Godot-4
GitHub
GitHub - TheHyper-Dev/Call-of-Duty-Movement-in-Godot-4: A Godot 4 p...
A Godot 4 project that imitates the movement mechanics of Call of Duty games - TheHyper-Dev/Call-of-Duty-Movement-in-Godot-4
10 Replies
what do you need help with?
do you have a local git repo or is the only git involved the repo on github?
I have a project on my PC that I've newly worked a lot on, now I want to upload it and overwrite the existing github project
$gitstarted
git init
initializes the repository
dotnet new gitignore
adds a .gitignore file
git add .
starts tracking all files
git commit -m "[message]"
creates a commit
git remote add origin [url]
adds a remote repository
git push -u origin main
first push, sets the remote as upstream
git push
all pushes after that can be just this
Git cheat sheetah great, thanks, one more thing
I gotta have a godot 4 gitignore file
don't know how to do that through code
this is the gitignore
Yeah, seems fine
I got no idea how to make this on cmd.exe
I assume this replaces the "dotnet new gitignore"
There usually is only one gitignore, yes
Why would you want to... dunno, create this specific gitignore via the command line?
Just open the file and add the lines you need
cause there's a folder with tons of unnecessary files related to the Godot game engine
via the command lineyou don't need to make a .gitignore through code, it's just a text file also, since you already have a version on github those instructions from modix aren't going to work exactly right if you care about the version history on github you'll need to clone it, replace the contents with your current version, then make a new commit otherwise just follow modix instructions and add
-f
to the push to overwrite anything that's on github