Setup GIT for a project (GitHub)

Scenario:

Create a new Project. Save the repository on GITHub

Solution:

  1. Download https://git-scm.com/downloads and setup
  2. Create account on GitHub https://github.com/
  3. Check if is GIT tracking your project.
    1. Command Line -> Navigate to Test Git Project folder -> git status
      • If error: fatal: Not a git repository (or any of the parent directories): .git, i.e. folder is not being tracked by git.
  4. To initialize GIT
    1. Command Line -> Navigate to Test Git Project folder -> git init
  5. Github account. -> '+' icon -> 'New Repository' -> "Test Git Project" - > Create Repository'.
  6. Connect local folder to Github repository.
    1. Copy link under the title, e.g. "https://github.com/.../Test-Git-Project.git"
  7. In Command line run below commands:
  8. 1
    2
    3
    4
    git remote add origin https://github.com/mindplace/test-repo.git
    git add . [add all files to staging area]
    git commit -m "intial commit"
    git push origin master [Login]

  9. Github -> repository screen -> refresh Project
  10. Your Project/files would now be available on GITHub.

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...