RESET BRANCH/FILE
-- force discard —
git reset --hard origin/<davidBranch_name>
example with the master branch
git reset --hard origin/master
-- force discard —
git reset --hard origin/<davidBranch_name>
example with the master branch
git reset --hard origin/master
You can undo git add
before commit with
git reset <file>
or
git reset <directory>
It will not delete any of your files
touch .gitignore
.DS_Store /vendor
Use git checkout <sha1>
to check out a particular commit.
git checkout local-branch-i-want-to-revert
git reset --hard origin/branch-i-want-to-copy
sudo yum install epel-release
)sudo yum install git
curl -s https://setup.ius.io/ | sudo bash
or here
sudo yum install git2u
rpm -i --nodeps git-lfs*.rpm
, or just use the Other
instructions. The only other advanced way to fool yum is to create and
install a fake/real git rpm to satisfy the git >= 1.8.2 requirement.
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
from here
sudo yum install git-lfs
git lfs install
brew install git-lfs
git lfs track "*.psd" git add .gitattributes
git add file.psd git commit -m "Add design file" git push origin master
ssh -T -ai ~/.ssh/id_rsa [email protected]
Solution 1
#1 Remove the key from your GITHUB repository->deploy
#2 Copy your key from macbook
pbcopy < ~/.ssh/id_rsa.pub
#3 Paste your key in the Github->repository you want to use
Solution 2
you can do a do a git clone against the https url
git clone https://git.com/david/global-helpers.git
Here is the command on how to resolve (modified content)
git rm -rf --cached yourfolder
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_rsa (regular unix system)
$ ssh-add -K ~/.ssh/id_rsa (for macbook)
$ pbcopy < ~/.ssh/id_rsa.pub
(for macbook)
Paste key into github
$ git remote add origin [email protected]:xxxxxx/xxxxxxx.git
$ git remote -v
$ git push -u origin master
$ git push origin master ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Critical command line to address the issue –
Ensure ssh-agent is enabled:
eval "$(ssh-agent -s)"
$ rm -rf .git/refs/remotes/origin # remove all origin/* $ mkdir .git/refs/remotes/origin # create empty origin/ $ git fetch origin # repopulate origin/*