Git: recover deleted files
To recover deleted files automatically without specifying the path git ls-files -d xargs git checkout —
Il n'y a pas de questions bêtes
To recover deleted files automatically without specifying the path git ls-files -d xargs git checkout —
sudo npm cache clean -f sudo npm install -g n sudo n stable sudo ln -sf /usr/local/n/versions/node/5.4.1/bin/node /usr/bin/node
Since git 1.7.0 it is possible to use a technique called sparse checkout The steps for cloning are: Mkdir<repo></repo> Cd<repo></repo> git init git remote add -f origin<url></url> This creates an empty folder, runs the fetches but without checking out the files. Then you have to configure git to use sparseCheckout. git config core.sparseCheckout true Then … Read more
When setting up nginx it can happen that afterwards it is not possible to connect to the server and that you receive a “hostname not found” error In the terminal, we start by using curl -v domain.dev The error appears Rebuilt URL to: domain.dev/ Hostname was NOT found in DNS cache Trying 127.0.0.1… connect to … Read more
Sometimes when you work with git, you don’t find all the remote branches. Even after using git fetch they do not appear. fetch git it is very likely that the origin of the fetch is wrong. We can see, for example, that here only the master branch is updated. $ git config –get remote.origin.fetch ‘refs/heads/master:refs/remotes/origin/master … Read more
After a sprint, all the local branches you have are useless and take up space. Below is a small command to remove them (except master) git branch grep -v “master” xargs git branch -D
To list local and remote branches $ git branch -a remotes only $ git branch -r For the list to be up to date you can use $ git remote update $ git remote plum origin