如何在AWS CodeCommit仓库中创建文件夹并通过控制台上传文件?
Great question! As someone who’s walked many new AWS users through CodeCommit, I can confirm you absolutely can create folders and upload files directly via the console—no command-line Git required. This is a fantastic starting point for folks getting comfortable with AWS’s version control tools. Let’s break down the step-by-step process:
Step 1: Access your CodeCommit repository
Log into the AWS Management Console, search for CodeCommit in the top services search bar, and select your existing repository from the list. You’ll land on the repo’s main Code tab by default.
Step 2: Create a new folder
- Near the top of the page, you’ll see a path input box (it starts with
/for the repo’s root directory). - To create a folder, type your desired folder name followed by a trailing slash (e.g.,
project-docs/) in this box, then press Enter. You’ll see a message saying the path doesn’t exist yet—this is normal, we’re creating it from scratch!Pro tip: The trailing slash is critical here—it tells CodeCommit you’re making a folder, not a file.
- Click the Create file button (usually located in the top-right corner of the screen) to proceed.
Step 3: Upload an existing file or create a new one
You have two options here, depending on what you need:
- Upload a local file: Switch to the Upload file tab (next to the default Edit file tab). Drag and drop your file from your computer into the upload area, or click Choose file to browse your device for the file.
- Create a new file in the console: Stay on the Edit file tab, enter a file name (like
setup-guide.md) in the File name field, then add your content in the text editor below.
Step 4: Commit your changes
- Scroll down to the Commit changes section. Add a clear, concise commit message (e.g., "Add project-docs folder and initial setup guide")—this helps you (and anyone else working on the repo) track what changes were made. You can also add an optional extended description if you want to provide more context.
- Verify the Author name and Email address fields (these pull from your AWS console settings, but you can edit them here if needed).
- Click Commit changes to save all your updates to the repository.
Once you’ve committed, you’ll be redirected back to the repo’s Code tab, where you’ll see your new folder and file listed. You can repeat these steps as many times as needed to add more folders or files to your repo.
内容的提问来源于stack exchange,提问作者WCM

