How to pull on Git
- Related posts
How to merge Git branch
refer How to push on Gitrefer How to switch Git branchRefer How to first commit on GitI used to GitLab before, and now I have set up Gitea on my Synology NAS server. š” tip: This post is a simple guide on how to use Git. First of all, I want
FINALLY
We only have one last step left.
When you changed laptop or development enviroment, etc...
What should you do?
This time, I will teach about how to pull on Git.
š” tip: This post is a simple guide on how to use Git.
Web
- Copy to secondary(develop) branch https address
Local repository
- Open terminal
- Create to project directory
$ mkdir YourProjectDirectory
- move to project directory
$ cd YourProjectDirectory
- Set your Git information
$ git config --global user.name "YourName"
$ git config --global user.email "YourEmail"
- Initialise local repository Git
$ git init
Result:
Initialized empty Git repository in /Users/.../.git/
- Create to local branch
$ git branch -M develop
- Add remote repository Git branch to local
$ git remote add origin YourGitURL
- Pull from local to remote repository
$ git pull origin develop
Result:
remote: Enumerating objects: 13, done. remote: Counting objects: 100% (13/13), done. remote: Compressing objects: 100% (12/12), done. remote: Total 13 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0) Unpacking objects: 100% (13/13), 9.23 KiB | 1.54 MiB/s, done. From https://YourGitURL.git * branch develop -> FETCH_HEAD * [new branch] develop -> origin/develop