Skip to main content

Using GIT with BitBucket (or any other remote repository)

It is quite simple. Follow this link to install and setup GIT: 


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 to Commit:


Give a commit message:


This will commit the file to local repository. But you have to ensure that these changes are pushed to our BitBucket repository also.

Click on ‘Push’. New popup will open showing all the branches in the remote repository. Currently we have only one branch: master.


Click on Push. It will ask for your BitBucket account password. If everything goes fine, you should get success message.

Go to BitBucket repository. Click on Commit or Source and you should see new file added/updated.

How to Remove a checked in file:

I don’t know how to do this using GIT GUI. So if you have to do it, you can use GIT bash.

Open GIT bash.
Navigate to file path.
Give these commands:

git rm file1.txt
git commit -m "remove file1.txt"
git push -u origin master
This will remove the file from local as well as remote repository.

Comments

Popular posts from this blog

How I converted a table in an email to a graph on a website? Hint: Azure Functions and Logic App

This mini-project started as a necessity.  I get an email like this everyday, which gives daily numbers for different metrics. The problem with such an email is that it is difficult to keep track of or gauge the rate of growth of these metrics. If you want to know how what the previous day's numbers were you need to go to the previous day's email.  The better option any day is to have a graph that shows the values of the metrics every day. Something like this: With this goal I set out to make this system but with as less coding and expenses as possible.  First obvious step in the process was to get hold of the email and extract its text. The easiest way to do this is to use Azure Logic App.  Here is what my logic app looks like: When any new email arrives in my Outlook 365 account, with a subject that contains "System usage Stats as on", it passes the body of the email to an Azure function named 'EmailTextCleanerFunction' (code below), whose job is to clean an...

Changing Eclipse Workspace Directory

Recently I moved my entire Eclipse installation directory but the workspace was still getting created in the older location only. And worst there was no option to select the Workspace directory in the Window->Options->Workspace menu. To change the workspace location in Eclipse do this. Goto ECLIPSE_HOME\configuration\.settings directory, edit the org.eclipse.ui.ide.prefs file and change the RECENT_WORKSPACES value to the desired location. If you want that Eclipse prompts you to select workspace when you start it, change the SHOW_WORKSPACE_SELECTION_DIALOG value to true. And you are done!

Hands on review: Yahoo! Mail app for Windows 8

Before you start mocking me for using Yahoo! Mail, let me explain that this is NOT my primary mail account and I use Gmail and Outlook.com for my daily use. Yes, this Yahoo! account was once my daily haunt but that was during college days and those days are long gone. I don't use Yahoo! Mail much but still there are some group subscriptions and I just log in once in a while to see what's happening in those forgotten groups. And due to this reason, I have always kept track of changes in Yahoo! Mail and the fact is that you can blame them for everything but not really lack of trying. Though most of those tries just ended up cluttering the UI and adding somewhat needless features. However, now we hear that new CEO Marissa Mayer is focusing once again on the mail and first major product to come out is Yahoo! Mail app for Windows 8. So how is it? The Login screen is pretty neat and purple background with an envelope watermark is very pleasing, very Yahoo!. However why ...