How to pull on Git

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

  1. Copy to secondary(develop) branch https address

Local repository

  1. Open terminal
  2. Create to project directory
$ mkdir YourProjectDirectory
  1. move to project directory
$ cd YourProjectDirectory
  1. Set your Git information
$ git config --global user.name "YourName"
$ git config --global user.email "YourEmail"
  1. Initialise local repository Git
$ git init

Result:

Initialized empty Git repository in /Users/.../.git/
  1. Create to local branch
$ git branch -M develop
  1. Add remote repository Git branch to local
$ git remote add origin YourGitURL
  1. 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