crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

By Using Git and Visual Studio 2015 to do Pull, Push and Edit files?
Question Posted on 19 Apr 2024Home >> Repository Questions >> Git Questions >> By Using Git and Visual Studio 2015 to do Pull, Push and Edit files?

By Using Git and Visual Studio 2015 to do Pull, Push and Edit files?
Here in this tutorial you will learn how to do pull, push and Edit files from the master branch in Github repo, then we do edit files and pulled from that repo to upload it to new separate branch. Now below are different steps to do all of these operations:-

(1)In our first step we open VS2015 and then Team Explorer (View -> Team Explorer), then select manage connections (Powerplud icon).

And then we should see title Local Git Repositories.

We can select clone then enter the url of the github repo you would like to clone.


Local GIt
(2)Now you can open the local repository by just selecting from the right click -> open. After that this will take you to the Team Explorer home tab for the repository here by selecting the Branches.


Team Explorer

(3)This will take you to branches screen, then you will select a branch by right click -> New Local Branch from...


Active Git Repo
(4)Now you will be prompted to name your branch, then click Create Branch


Git Branch

(5)Here your branch will be automatically checkout if checkout branch is ticked. otherwise it should appear in the list of branches where you can right click -> checkout.


Now we can make free changes. ANd once you are ready to commit select the changes tab from the Team Explorer Home menu. Now you can see all the changes and here you have option of staging, by just right clicking each file you would like to commit and staging it, or by committing all changes by selecting commit all.


Git Changes

(6)Now the changes are commited to your local repo, to push to a new remote branch you will need to publish. To do this go to the Sync tab from the Team Explorer home tab and select publish.


Final Sync


And if you are using Terminal then you can use below commands
git clone https://github.com/project/url

cd new_project_folder

git checkout master This will make sure you are on the master branch.

git checkout -b new_branch_name This creates a new branch off of master




open project in Visual studio and make changes as desired.

Back in terminal

And if you are using Terminal then you can use below commands
git add . This will stage all your changes

git commit -m 'write your commit message here' Commit your changes

git push -u origin new_branch_name This will push your changes to GitHub

0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Why Git is fast and which language is used in GIT?

What is syntax to fix a broken commit in GIT?

What is GitLive new features that will change the game?

What is Subgit and what is the use of this?

Difference between Git and SVN






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap