GIT Hub basics

 

Scenario:

GIT Hub basics

Solution:

Clone
  1. Navigate to local folder
  2. git clone https://github.com/UserName/Test-Git-Project.git / git@github.com:UserName/Test-Git-Project.git
  3. Open GIT Bash
  4. Navigate to the above folder
  5. Create Document - > touch MyTestdocument.txt
  6. git add MyTestdocument.txt - staged
  7. git status
  8. git commit -m "First commit" //git commit [use -am "message" to add and commit at once]
  9. git push origin
  10. notepad MyTestdocument.txt
  11. git status
  12. git add MyTestdocument.txt -- staged
  13. git status
  14. git commit -m "Second commit"
  15. git log
  16. to exit log type q or z
  17. git add -A [ to add all files at once]
Create Repository/ Organization/ Owners [Admin]/ Collaborators

  • New Repository
    1. Repository Name
    2. public/private
    3. add readme/gitignore [Csharp]
  • Organization
    1. Account settings
    2. https://github.com/settings/organizations
    3. Create new organization [name/email]
    4. Create New Repository  under Organization
  • Collaborators
    1. Go to Repository -> settings -> Manage Access
    2. https://github.com/[Organization]/[Repository]/settings/access
    3. Organization -> teams -> new team [what permissions to give on organization]
    4. https://github.com/orgs/Organization/teams
  • Multiple users on one machine
    1. git config --list
    2. git config credential.username ''
    3. git config --local user.name ""
    4. git config --local user.email "@example.com"
    5. git config --list

No comments:

Post a Comment

Move Github Sub Repository back to main repo

 -- delete .gitmodules git rm --cached MyProject/Core git commit -m 'Remove myproject_core submodule' rm -rf MyProject/Core git remo...