update.sh script disappeared - ASU-CompMethodsPhysics-PHY494/PHY494-resources GitHub Wiki
I told you that once you have your assignment-2018-YOURUSERNAME repository you should git-clone it it to your laptop. Then you should run from inside the repository on your laptop
bash ./scripts/update.sh
Some of you (on Windows) reported that this does not work
- You get an error similar to Cannot update scripts/update.sh. Permission denied.
- And then
scripts/update.sh
has disappeared! (see issue #4)
The following should be a work-around the problem. Please try it out or ask for help.
-
cd into your assignment-2018 directory
-
Run
git status
.- If you see "deleted: scripts/update.sh" and "Untracked files: project_1/" then you need to fix this problem. Continue with 3.
- If you see "nothing to commit, working tree clean" then all should be good. You don't seem to have a problem. Stop here.
- If you see "modified: some/file_name" then you should
git add some/file_name
and commit your changes withgit commit
(just to be clear: replace "some/file_name" with whatever you see on your screen). Basically, make sure that you committed all your changes. If you also see "deleted: scripts/update.sh" and "Untracked files: project_1/" then also continue with 3. Otherwise stop here.
-
We need to do some clean-up first:
rm -r project_1 # do NOT remove project_1 if you have been working on project_1 ! git checkout -- ./scripts/update.sh
(Explanation: the
project_1
directory needs to be removed because it will be in the way (the only reason that it is there is because of an incompletegit pull
earlier – should not have happened but apparently does... sorry); the second command recreates the./scripts/update.sh
file from the repository (this is a way to get a file back that you deleted accidentally, note the double-dashes "--
"!)) -
Now pull the changes manually
git pull skeleton master
(Explanation: the changes are pulled from the remote repository "skeleton" https://github.com/ASU-CompMethodsPhysics-PHY494/PHY494-assignments-skeleton.git )
This should update everything. You should also be able to run
bash ./scripts/update.sh
again.
If this is not working please let an instructor know and we'll try to help. You might have to see us with your laptop so that we can sit down and fix any issues.
Apologies for these inconveniences. To the best of our understanding this is an issue on Windows where git-bash does not like the fact that the update.sh script wants to change itself while it is being run. The issue does not appear to occur on macOS and Linux.