fatal: 'official-cmssw' does not appear to be a git repository
When trying to do
scram project CMSSW_5_3_14_patch1
cd CMSSW_5_3_14_patch1/src
cmsenv
git init
git cms-addpkg PhysicsTools/PatAlgos
you might get the error message:
No release tags specified, using default CMSSW_5_3_14_patch1.
You are on branch CMSSW_5_3_X
Checking out PhysicsTools/PatAlgos in tag CMSSW_5_3_14_patch1.
fatal: 'official-cmssw' does not appear to be a git repository
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
SOLUTION:
Repeat instruction but
don't use git init
. Note that you need to start again, afresh (i.e.
rm -r CMSSW_5_3_13_patch1/
).
Also make sure that you have registered your git name with CMS, and that you have setup SSH keys. Test the latter by doing:
ssh -T git@github.com
Updating local tags
Say someone has created a new tag, you'll need to update your local repository with the info that there is a new tag. Do this by:
git fetch --tags
Now if you do git tag to list all tags, you'll be able to see new any tags, and can check them out:
git checkout <tagname>
Manual stashing/stashing 1 file
Say you have several files that have been updated, but you only want to stash one file's changes. Or you want to manually select which edits in a given file(s) are stashed.
To do this, use
git stash -p
Then you manually go through all the "hunks" of edits in each file. For each hunk, there are several options. To stash the edits from one file, skip through all the files you don't want to stash by pressing
d
, then when you get to the one you want to stash, press
a
. Then keep pressing
d
to ignore the other files.