I recently took CS50 mobile app development with react native course and proceeded for the submission as mentioned but was unable to go to branch cs50/mobile/2018/x/projects/0 as it stated the branch name is invalid also when I visited cs50.me and searched for courses it showed cs50x 2018 and instead of branch as projects/0 it showed Scratch and was given 0 score as in check50 they are showing some weird errors like .sb2 doesn't exist. Any help would be appreciated. (Project 0-todo app)
I'm a big believer in command line, so this might not be the easiest way, but should work reliably.
As I am not taking the same class, I did something to quickly replicate. As you seem to not be using
submit50, I also won't.
You might have done some parts already. I'm starting in my "freestyle" directory where I test out things and have no important files, just in case.
git clone https://github.com/submit50/YOURNAME.git
to clone the shared repo, this will set up remote for you, easier than
git init and fixing the remote later. It will create the repo in a YOURNAME directory.
to change into the repo created locally
git checkout --orphan cs50/2018/x/mario/more
change the slug to your actual project's. This creates a new branch with no ancestor, no history. I chose that one as the various problems are not related, so any ancestor relation would be artificial. Do a non-
orphan checkout if the branch already exists and you want to keep the history.
in my case there was some file in the current directory I did not want to be part of this particular branch
cp ~/workspace/CS50x_2018/pset1/mario/more/mario.c .
copying whatever I want to submit into the branch. Do however you copy files/directories usually. I use a copy in this case, and do not work directly in the repository, since I fear messing up with
git, it's still new to me. Using a
.gitignore to exclude compile artefacts and sensitive information, working in the repo should actually be a good idea, will have to try that in the future.
git add --all
You could use
git add . in case there are no files to remove.
-all additionally processes deleted files.
git commit -m "Submitted via command line :)"
-m you specify a one-line commit message. And finally
git push origin cs50/2018/x/mario/more
Again, change the slug.
Worked for my
mario/more, the submission shows up on cs50.me in both submissions and the course scores.
edit: I missed the problem with your existing branch on the remote. You cannot have both a branch of
my/branch/too at the same time, so you have to delete the one you don't want. Remote branches can be deleted using
git push origin :my/branch/to/delete
: separates the local and remote branch name, so here you push nothing to the existing remote branch.