I, and everyone else, am going to encourage you to not be too adventurous with your gas lines. There probably are some folks out there who work on gas lines without turning off the main, but you should not follow in their footsteps. I cannot say what your local utilities require, but in NJ you can certainly shut off your gas supply in your house (at the meter) without notifying the utility company. However, depending upon the work you want to do, it may require an inspection from your local building department. With that being said, I expect many people would probably not get a permit for minor work.
As far as doing the work, I am not sure I understand your goal. I think you want to shorten the stub coming our from the wall. The problem in doing this yourself is that you will be banging the pipes around a bit and you could possibly cause a joint you are not working on to fail. Without pressure testing the pipes you would never know about the leak until it was too late.