Creating a new code repo from a local working copy
with the Github for Mac app
GitHub Desktop Focus on what matters instead of fighting with Git. Whether you're new to Git or a seasoned user, GitHub Desktop simplifies your development workflow. Download for macOS Download for Windows (64bit) Download for macOS or Windows (msi) Download for Windows. By downloading, you agree to the Open Source Applications Terms.
- How to publish to Github Pages. Github Pages is a service run by Github that, when properly configured, will auto-publish the contents of your repo onto the Internet. To get Github Pages to work for you, if your username is yourusername, then you must create a repo named yourusername.github.io.
- At GitHub, we think that sharing code should be as simple as possible. That's why we created GitHub Desktop for Mac. The sync button pushes your changes to GitHub.
- GitHub Desktop offers you the possibility to manage multiple projects in an organized and clean environment, and it is designed to help you rapidly fork and clone repositories, to synchronize branches, and to publish the modified code with minimal effort. Git client Sync repository Clone.
- From the repositories view in the app, drag the project folder to the bottom of the left sidebar.
- Hit 'Yes' when it asks if you want to create a local git repository
- Go to 'Changes' view (⌘2)
- Select the files that you want to commit their current state to the repository. You can view the changes of the file by clicking on the double up arrow on the file name bar.
- Type a commit summary, usually a description of what you've just added or changed.
- Click 'Commit'. This commits the current state of the code to your local repository. Do this every time to do something significant like fix a bug or develop a feature. Commit early and often. Each state of code is available to you at any time via the History view (⌘1).
with the command line
- Open Terminal.app
- 'cd' to directory
- Initiate a git repository
- Add existing files
- Commit all files (-a) and add a message (-m)
Cloning (checking out) someone else's repository
with the Github for Mac app
- Visit the repo on Github.com and click the 'clone to Mac' button, or...
- Select the repo in the Repositories list within the app, under the cremalab account.
with the command line
- 'cd' to desired directory
- clone the repo with the clone url
Syncing repository branches with a remote repository
with the Github for Mac app
- Make sure you have committed the current state of your code
- Drill into your repo in the app and click Sync Branch in the upper right corner. This pulls down the latest code from the remote repository, merges your code with it, and pushes your changes to the remote repository.
If you only want to get the latest code from the remote repo, select Repository > Pull (⇧⌘P) from the menu bar. This merges the remote code with your local code but does not push up your changes.
If you only want to push up your current state to the remote reop, select Repository > Push (⌘P). This will only work if you already have the most up to date code from the repo.
Github For Mac Publisher
![Mac Mac](/uploads/1/1/9/7/119762231/546290298.png)
with the command line
![For For](/uploads/1/1/9/7/119762231/460313834.png)
- Make sure you have committed your current state.
- Get the most up to date code from the remote repo
Github Setup On Mac
- Push your local code to the remote repo