I think it would be extremely rare (e.g. almost never) to let anyone go after 2-4 weeks (for performance related things), and rarer still for that to happen to a junior developer, so take a deep breath and relax. Now let's figure out how to "get up to speed" and begin to feel a bit better about your position.
They hired you after looking at your resume and interviewing you, so they are aware of exactly what you know, exactly how much experience you have. They don't expect you to know everything, they don't expect your work to be mistake free, and they don't expect you to be as productive as their senior developers.
What they did hire you for is your potential, for what you will eventually be able to produce for them. So you should start thinking about how to develop and execute a plan so you can start achieving your potential.
The first and most important thing to realize is that it is your manager's job to do his/her best to give you the opportunities to succeed - this can only happen if you two have regular and frequent conversations, and if during those conversations you are open and honest about where you are having difficulties, where you need support, where you are getting stuck, and where you learn what he/she is expecting from you.
I'd start by approaching your manager today and ask to schedule a weekly, half-hour meeting (assuming you don't already have something similar set up). Say something like "I believe the best way I can be successful working for you is if we can sync up on a regular basis, can we schedule a weekly meeting?".
At the first meeting, you should be very enthusiastic about working there and express how excited you are to begin making an impact.
At that same meeting, it is important, though, that you ask (and get answers to) the following questions "what is expected of me (goals) over the next few months?", "what (tools/techniques/systems, etc.) do I need to learn to start accomplishing those goals?", "is there any formal training for learning those things?", "who are the resource at the firm who will help me learn those things?".
It is your manager's job to answer those questions, and to make sure you know what you need to do, how you are going to learn what you need to learn, who is there to help you, etc.
The most important thing to remember is that you shouldn't be afraid to ask your manager, or anyone formally or informally tasked to help you, or most other people as well, for guidance, advise or help. Remember, no one is born knowing how to program, or how source control works, or anything. So after spending a reasonable amount of time trying to figure something out, do not be embarrassed to ask for help.