Last active
November 13, 2018 16:58
-
-
Save wolfsyntax/2d8e95f79ba5d5da36772c588dd4f423 to your computer and use it in GitHub Desktop.
Senior Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install https://git-scm.com/download/win | |
2. Edit Config: | |
git config --global user.name "Your name" | |
git config --global user.email <someone@example.com> | |
Open Github.com > Settings > SSH and GPG Keys > New SSH Key | |
then paste the content of ~/.ssh/id_rsa.pub | |
3. Setting Up a new Git Repository | |
echo "#Gist" >> README.md | |
git init | |
## version controlling | |
git add README.md | |
git commit -m "Initial commit" | |
git remote add origin git@github.com:<username>/<reponame>.git | |
git push -u origin master | |
#Existing Repository | |
git remote add origin git@github.com:<username>/<reponame>.git | |
git push -u origin master | |
========================================================================================================== | |
Other Useful Commands | |
#Add all | |
git add . | |
#If remote origin exist | |
git remote rm origin | |
#Fetch repository update | |
git pull origin master | |
#Delete file from repository | |
git rm <filename> | |
#Delete directory from repository | |
git rm <directory> | |
#Generate SSH Keys | |
ssh-keygen -t rsa -C "Your email" | |
#Clone Repository | |
git clone git://github.com/<username>/<reponame>.git | |
#Clone Repository with different directory name | |
git clone git://github.com/<username>/<reponame>.git other-name | |
#Checking status of your file | |
git status | |
#Ignoring specified file/directory | |
Create .gitignore file and add the filenames/directories you want to remove | |
#Commiting Changes | |
git commit -m " " | |
#Moving Files | |
git mv files_from files_to | |
#Initializing Repository | |
git init | |
git remote set-url origin http://github.com/YOU/YOUR_REPO | |
git remote add <remote-name> <url> | |
git push different-repo master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment