-
Notifications
You must be signed in to change notification settings - Fork 1
Pushing to repo via Git Bash or Terminal
Run git clone repo-name
Go change to the directory cd name
then run git init
And then you can add this repo's name to yours as the remote origin (the online repo pretty much) by saying git remote add origin repo-name
Check your remote by git remote -v
You can do git fetch
or git pull
to get or set the remote repo
You will do these status steps:
-
git status
to check if there's any files/changes to be staged -
git add .
orgit add file-name
to push it to staging -
git commit -m "I did this to the files"
to commit the staged files to pushing -
git push origin master
orgit push origin branch-name
to get those files onto the remote branch on Github
There might be conflicting histories with your branch versus the remote. Try adding the files there onto your local git repo by saying git pull origin master
or git pull origin branch-name
If you don't care about the history, then just do git pull origin master --allow-unrelated-histories
There also might be large files that are like 100Mb and you might have to do git LCFS for large files.
I highly recommend making your own branch (version) so we don't conflict with the master branch. You can do so by creating one by git branch branch-name
and then git checkout branch-name
You can perform your work there and then push to the origin by git push origin branch-name
Fill in the credentials and you're done.