Thursday, April 5, 2018

Git


Could not switch branches. Got permissions error on a particular folder. Restarted IIS and recycled the app pool. Also, might need to manually delete .git/packed-refs.lock file

==============================


Open GitBash

2.git config user.name "someone"
3.git config user.email "someone@someplace.com"

From <https://stackoverflow.com/questions/11656761/git-please-tell-me-who-you-are-error>

cd /C/Code/VAPI
git init

echo "# VAPI"
git init
git commit -m "first commit"
git push -u origin master


Adding a remote
To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at.
The git remote add command takes two arguments:
For example:
git remote add origin https://github.com/user/repo.git
# Set a new remote
git remote -v
# Verify new remote
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)

From <https://help.github.com/articles/adding-a-remote/>


================== Adding a folder without a solution/project in it to git==============

In the folder right click to open Git GUI Here. State and commit all files locally. Then push to Arbitrary Reporisotyr (copy url from git). It has to be un-initialized (no readme file or any other files in there).

No comments:

Post a Comment