Commands MSI
Commands MSI
Commands MSI
M in dcr sbr r2n; do for S in [0,1,2,3,4]; do python runner.py --d $D --g $G --m
$M --s $S; done; done; done; done
----------------------------------------------
CHANGE USERNAME
git config --global user.email rodrigo.castellano@unisi.it
git config --global user.name rodrigo-castellano
git config --global --list
--------------------
CLONE REPO
clone a repo:git clone
https://rodrigocastellano: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@github.com/nesy-
deep/keras-ns.git
clone a repo: git clone
https://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@github.com/rodrigo-castellano/
keras_ns_grounders.git
---------------------------------
RESTORE REPO AND CHANGE BRANCH
git branch
git checkout dcr_r2n_with_neural_grounder
#restore repo:
git stash # to undo all the tracked changes
git fetch origin
git reset --hard origin/main # this is for the main branch!!!!!!
git clean -fdx # to remove also untracked files
------------------------------------------------------------------------------
CONFLICTS WITH GIT
you have your changes in you server, and have the same file hparam.txt in both
places, but dont want to sybcronise that one.
git pull origin branch_name --skip hparam.txt
if you have your changes in you server,and you only want to push to the server all
the files except for two, how can you do it?
git add . # to add all the files
git reset -- file # to remove the file you dont want to update
git stash # to remove all the not added files (in this case only the file)
git commit and also git push
-----------------------------------
GLOBAL TARGET
# it is better not to have any global target
pip config list # to see the current path to global (there should be none, because
otherwise libs are always installed there even if we are in a env)
config unset global.target
pip config set global.target C:\Users\rodri\Downloads\PhD\Review_grounders\
Env_ns_311\Lib\site-packages
pip install --target=C:\Users\rodri\Downloads\PhD\Review_grounders\Env_ns_311\Lib\
site-packages numpy
GIT:
git add .
git commit -m 'huk'
git status
git show can be used with HEAD and tilde to show what changed in a specific commit.
git diff hash1 hash2 will display changes between two commits, as will git diff and
different HEAD paths.
Lastly, git annotate file will show line-by-line changes to a file and its
associated metadata.
----------------------------------------------------------------------
making changes
To unstage a single file, we can use the command git reset HEAD followed by the
filename
to move all files in the staging area back to the repo, then we execute git reset
HEAD without specifying any filenames.
-------------------------------------------------------------workflows
git branch
git checkout -b 'newbranch'
git diff main newbranch to see the diff
git checkout newbranch to change to this branch
git merge source destination
-----------------------------------------
git fecht origin main to see the changes between main branch and the remote rrepo
called origin
fetch+merge =pull git pull origin main