Skip to main content

Posts

Showing posts with the label git

How to update git remote origin URL

OK, whatever way you are passionate about when it comes to updating your remote origin URLs, I have got you covered! Option 1: Go to config file in /.git folder.      change url field from      url = ssh://git@<old-url> to url = ssh://git@<new-url> Option 2: Go to your repo location, on cmd give git remote set-url origin ssh://git@<new-url>.  Option 3: Go to your repository in source tree, click on settings, on Remotes tab in repository settings box, you can select the origin and edit. What is life without options!! 

Using GIT with BitBucket (or any other remote repository)

It is quite simple. Follow this link to install and setup GIT:  https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101 Do not create a new repository in BitBucket, as we already have couple of repositories. Do your operations on any of the two existing repositories. How to use the GIT UI: After cloning ‘web-app’ repository I get the ‘web-app’ folder on my machine. Initially it is empty since there is no source code. I added a file ‘Read Me.txt’ If I right-click on the file and select ‘Git GUI’. It will prompt me to select between ‘Creating a new repository’, ‘Importing/Cloning a new repository’, ‘Opening an existing repository’. Since we already have a repository created, select ‘Opening an existing repository’. Give the directory of ‘web-app’ folder (the folder which contains .git file). In GIT, checkin is a 2-step process: We need to add file to staging area and then add to commit. Select the ‘Read Me.txt’: Select Commit->Stage ...