-
git commandsBackend, Environment/Git 2019. 12. 30. 15:44
## import sources from existing folder
- Go to your project folder :
$ cd /my/project
- create .gitignore
- Add your project files to the repository
$ git init
$ git add .
$ git commit -m "Initial import"- Launch the following command, replace <username> with your repository name :
$ git remote add origin https://<username>@ecmgitint.lfconfig.xyz/<repository>
ex) $ git remote add origin https://deluxjun@ecmgitint.lfconfig.xyz/smartwork
- Push the files on the remote server
$ git push -u origin master
- After this initial import, pushing your changes
$ git push
# git reset
$ git reset --hard HEAD
## get remote branch
$ git branch -r
$ git checkout -t origin/develop
## merge
# commit to develop
$ git branch
$ git branch develop
$ git checkout develop
$ git add .
$ git commit -m "message"
$ git push
# merge it
$ git checkout master
$ git merge develop
## add to github
github.com/deluxjun/edm-properties-react.git
$ git init
$ git add .
$ git commit -m "First Commit"
$ git remote add origin https://github.com/deluxjun/edm-properties-react.git
$ git remote -v
$ git push origin master