Git Workflow (Pushing and Pulling) (PART-2)

Share via:

Git Workflow (Pushing and Pulling) (PART-2)

In this article,we will see Push Commits from Central Repository add content to the file then push to Central Repository.

Implementation Steps

  1. Create a new directory and Initialize as Git Local Repository.
  2. Connect your Local Repository to Central Repository (GitHub).
  3. Pull Commits from Central Repository.
  4. Add content to the file.
  5. Adding file to Staging Area.
  6. Commit the file into Local Repository.
  7. Push Commits to Central Repository.
  8. Verify files/commits in Central Repository.
  9. Go to Mumbai Region.
  10. Pull Commits from Central Repository.
  11. Add content to the file.
  12. Adding to Staging Area.
  13. Commit the file into Local Repository.
  14. Push Commits to Central Repository.
  15. Verify files/commits in Central Repository.

Step 1 :

Create a new directory and Initialize as Git Local Repository

Create a new directory “londongit”

Go inside the directory “mumbaigit” and initialize git repository

To see the Local Repository

.git is the local repository.
By default,it will be hidden.(shouldn’t deleted)
Commits will be store in local repository (.git)

Step 2 :

Connect your Local Repository to Central Repository (GitHub)

Step 3 :

Pull Commits from Central Repository

Verify the file (Code)

To see the list of commits

Note
Whenever you pull the commit that will be there in work space,staging area and Local repository.

Step 4 :

Add content to the file

Add content to the file “myfile”

To see the status of git

Step 5 :

Adding file to Staging Area

Add

Add file to Staging Area.

To see the status of git

Step 6 :

Commit the file into Local Repository

Commit

To see the list of commits

To see the data of latest commit

Step 7 :

Push Commits to Central Repository

Step 8 :

Verify files/commits in Central Repository

Go inside github and see the files/commits.

Here,we can see 3 commits and file which has latest commit message.

To see the data of file

Click on myfile to open.

We can see the data of file.

Step 9 :

Go to Mumbai Region

Step 10 :

Pull Commits from Central Repository

Verify content of file

Step 11 :

Pull Commits from Central Repository

Verify content of file

To see the list of commits

Step 12 :

Add content to the file

To see the status of git

Step 13 :

Adding to Staging Area

Add

The file is Adding to staging area.

To see the status of git

Step 14 :

Push Commits to Central Repository

Step 15 :

Verify files/commits in Central Repository

Go inside github and see the files/commits.

Here,we can see 4 commits and file which has latest commit message.

To see the data of file

Click on myfile to open.

We can see the data of file.

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

 

Facebook : https://www.facebook.com/ktexperts/
LinkedIn   : https://www.linkedin.com/company/ktexperts/
Twitter     : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

2 thoughts on “Git Workflow (Pushing and Pulling) (PART-2)

  1. Usually I never comment but your article is so convincing that I never stop myself to say something about it. You’re doing a great job Man,Keep it up.

Add Comment