UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: How can I save my progress on GitHub?

Forums > 100 Days of SwiftUI

I'd like to start saving my progress on GitHub as I've noticed others have been doing. But I'm not quite sure how to save individual projects under one repository.

Anyone have a breakdown on how to do this?

2      

It's easier to have one project per repository.

I have not tried placing multiple projects in a Git repository, but a search for github multiple projects in one repository brings up several articles and Stack Overflow questions on how to do that.

3      

I would advise 1 project per repository.

Managing more than one project per repository is possible, but it become more difficult with branching, forking, variants and versions, etc. especially if you make an app to sell, and you have to make a release version then maintain it with all your other development and experimental projects along side.

3      

Saving your progress on GitHub is a fundamental part of using the platform to track changes and collaborate with others. To save your progress, you'll want to use Git, a distributed version control system that GitHub is built upon. Here are the basic steps:

Initialize a Git Repository: If you're starting a new project, navigate to your project's directory in your terminal and run git init. If you're working on an existing project hosted on GitHub, you can clone it to your local machine using git clone <repository URL>.

Make Changes: Create or modify files in your project as needed.

Stage Changes: Use git add <file> to stage the changes you want to save. You can also use git add . to stage all changes.

Commit Changes: Commit your staged changes with a descriptive message using git commit -m "Your message here". This saves your changes to your local repository.

Push to GitHub: If you're working with a remote repository on GitHub, use git push to send your committed changes to the remote repository.

Pull Request (Optional): If you're collaborating with others on a project, you can create a pull request on GitHub to propose changes and merge them into the main project.

Regularly Fetch and Pull: To keep your local repository in sync with the remote repository and to collaborate effectively, it's a good practice to regularly run git fetch and git pull to retrieve and incorporate changes from the remote repository.

These are the basic steps to save your progress on GitHub. Remember to replace <file> with the actual file name or use appropriate Git commands based on your project's needs.

2      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.