Sergey Nivens - Fotolia

Problem solve Get help with specific problems with your technologies, process and projects.

Use Git to version-control AWS app development

Our developers are looking for a simple way to keep tabs on code for AWS app development. How can GitHub help them manage and share application code?

Keeping track of application code is time-consuming, challenging and error-prone without the right tools. Using GitHub with Amazon Web Services is a popular repository that manages and shares code effectively. You can also use Git software to create a repository.

Git formalizes version control, eliminating the need to name files with version numbers or recreate the state of your code as it existed before you made the last known good changes. Git allows you to save versions along the way. It also streamlines sharing code with others.

A big advantage of Git is that collaborators can always get the latest good version of the code from a central repository. As long as you get into the habit of saving incremental and stable versions, collaborators will have access to those repositories.

Getting started with Git

After installing the software, the first step is to create a repository.

Use the "git init" command to create a new repository; this is basically a directory with a .git subdirectory. If you want to make a copy of an existing repository, you can simply copy or clone it with the "git clone" command. If you are using Git to version-control your own work, you might start with an empty Git repository. Then you can add files with the "git add" command; this tells Git to keep track of added files.

Once you've made changes to files, you can update a Git repository with the "git commit" command.

When you work with multiple repositories, it's typically a pull-and-push code method. A pull operation copies code from a remote Git repository and puts it in your repository. Push does the opposite: it puts a copy of your code in a remote repository.

Git also allows for branching, which makes logical copies of code so you can have multiple versions. This is useful for trying an idea and rolling back if it doesn't work.

About the author:
Dan Sullivan holds a Master of Science degree and is an author, systems architect and consultant with more than 20 years of IT experience. He has had engagements in advanced analytics, systems architecture, database design, enterprise security and business intelligence. He has worked in a broad range of industries, including financial services, manufacturing, pharmaceuticals, software development, government, retail and education. Dan has written extensively about topics that range from data warehousing, cloud computing and advanced analytics to security management, collaboration and text mining.

Dig Deeper on AWS tools for development

SearchAppArchitecture
SearchCloudComputing
SearchSoftwareQuality
SearchITOperations
Close