‘Swap file "./.bash_profile.swp" already exists’
Open the file with vi (vim):

vi .bash_profile


You will see a prompt like this:

[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:


Type the following at the prompt:

r


At the next prompt:

Press ENTER or type command to continue


Type:

:w savedfile


This will bring you into visual mode. Type:

:q!

to quit vim.

Now remove (unlink) the file .bash_profile.swp. You now can compare your original .bash_profile with savedfile and edit as necessary.