Create Folders in GitHub
- When upload files, pull the whole directory to the area.
- Add "dir/" in front of files to be committed.
- Use "git add folder/filename" or "git add file_path" and then "git commit" and "git push"
- In GitHub, click "Create new files", in the file name box, add "path_name / file_name"
Clone GitHub Repository
# git clone github_url local_directory 1. git clone https://github.com/changanna/java.git local_java_dir 2. git clong git@github.com:changanna/java.git # SSH protocol 3. git add file_path 4. git add . 5. git commit 6. git push
Check in Folders/Files For First Time
1.git init
2.git config user.name "someone"
3.git config user.email "someone@someplace.com"
4.git add *
5.git commit -m "some init msg"
6.git push
Check in Folders/Files Settings
1. using sourcetree: Repository -> Repository Settings --> Advanced --> uncheck "Use global user settings" box 2. Repository > Repository Settings > Edit config file. Check if the [user] section exists. If the user section is missing, add it. [user] name = "your name" email = "your email" 3. Don't use "git pull" to skip settings % git fetch % git reset --hard origin/master % git fetch && git reset --hard HEAD
Git Quick Guides
No comments:
Post a Comment