Connect 2 Yosemite Macs
In the Network Preferences panel there should be a listing for thunderbolt bridge. If there is not click on the "+" button at the bottom of the left-hand pane and add it to both Macs.

You can leave the setting on DHCP and they should both get an IP address in the range of 169.254.x.x. Make sure each is different.

You should now be able to go into terminal and ping the other Mac from each. Once you have verified that, just go into the Finder's "Go" menu and "connect to server". Enter the IP address of the other Mac, it should ask you for your username and password, enter the appropriate username and password from the other Mac, and you are connected.

You should be able to do the same with an ethernet cable between both Macs as well.