What is GIT?

365 단어·1 분·원문(.md)

git is a distributed version control system used to track changes in computer files and coordinate work among multiple files.

github is a web hosting service that supports projects using Git.


Uploading a Git Project #

  1. Create a repository + remember the address

  2. Perform initial setup.

git config --global user.name "NAME"
git config --global user.email "EMAIL"
  1. Prepare files
git init  # Create git files
git add . # Manage all files within the selected project folder
git status # Check status
git commit -m '내용' # Commit
  1. Upload
git remote add origin 리퍼지토리주소
git push origin master
  1. Done


Updating a Git Repository #

  • Used when initial setup is complete and you want to update
git add .
git commit -m '커밋메시지'
git push origin master

You can check the current status by typing git status.


Collection of Git Commands (a few only) #

Commands mentioned above are omitted.

clone #

git clone URL // Clone repository, download
git clone /로컬/저장소/경로  // Clone local repository

commit #

$ git add <파일명>
$ git add *   // Include changes of a single file in the commit

branch #

$ git branch // List branches
$ git branch // <브랜치이름>	Create a new branch (locally)
$ git checkout -b // <브랜치이름>	Create & switch to a branch
$ git checkout master	// Switch back to master branch

push #

$ git push origin master // Upload changes to remote server
$ git push < remote > // <브랜치이름>	Upload commits to remote server
$ git push -u < remote > // <브랜치이름>	Upload commits to remote server
Back-End/git/basic.md