To shrink the log in SSMS, right click the database, choose Tasks, Shrink, Files:

Shrink the log in SQL Server Management Studio

On the Shrink File window, change the File Type to Log. You can also choose to either release unused space, reorganize pages before releasing unused space, or empty file by migrating the data to other files in the same filegroup:

On the Shrink File window, change the File Type to Log.

Shrink the log using TSQL

If the database is in the SIMPLE recovery model you can use the following statement to shrink the log file:

        DBCC SHRINKFILE (AdventureWorks2012_log, 1)        

Replace AdventureWorks2012_log with the logical name of the log file you need shrunk and change 1 to the number of MB you want the log file shrunk to.

If the database is in FULL recovery model you could set it to SIMPLE, run DBCC SHRINKFILE, and set back to FULL if you don’t care about losing the data in the log.

        ALTER DATABASE AdventureWorks2012        SET RECOVERY SIMPLE        GO        DBCC SHRINKFILE (AdventureWorks2012_log, 1)        GO        ALTER DATABASE AdventureWorks2012        SET RECOVERY FULL        

**You can find the logical name of the log file by using the following query:

        SELECT name FROM sys.master_files WHERE type_desc = 'LOG'        

Another option to shrink the log using the FULL recovery model is to backup the log for your database using the BACKUP LOG statement and then issue the SHRINKFILE command to shrink the transaction log:

        BACKUP LOG AdventureWorks2012 TO BackupDevice