Overall, Fork doesn't actually bring too much new to the table, pretty much all the features I've seen in other Git clients as well. However, it seems to support the subset of features I care about and does it really well. It kind of feels like what SourceTree should have been if they hadn't ruined it in 2016.
GitHub is a great place for open source project that you can contribute to.One of them is the Firefly-doc repository which has all the developers documentation.This article explain how to work with a repository that you have only read access using Visual Studio.
Create a Fork on GitHub
If you don't already have a fork of the repository you can create one.
- Open a web browser to the GitHub project page (i.e. https://github.com/FireflyMigration/firefly-doc).
- Make sure you have a GitHub account and that you are logged in (your user avatar should appear at the top right corner)
- Click on the 'Fork' button in the upper right corner.
This creates a copy of the repository under your GitHub account which you have read and write access.
- Whether you are working with open-source or private repositories, you will want to learn the Git fork and pull request workflow. The biggest difference between a Git fork and pull request workflow and a Git branch workflow is that in forking you are working on your own copy of the project and not within the project. You push changes to your fork without changing the original project and then.
- Before you create a Git repository, you'll want to create a project folder in your source directory. Once you have a folder in your source directory, you can click on File then Create new repository in Fork to create your Git directory. To check whether the Git repository is created, you can open up the project folder and check for a.git folder.
Clone the forked repository
Clone your forked repository to your local machine using Visual Studio.
This creates a local clone of your repository with the cloud repository is configured as the default remote named 'origin'
Notice that this is your own copy of the repository connected to the fork and not the main repository.
Keeping your fork up to date with the main repository
Create 'upstream' remote
First, you need to add a second remote that refer to the original master repository.
- Click on View -> Team Explorer
- Click on the Home button
- Click on Settings
- Click on 'Repository Settings' hyper-link
- Under 'Remotes' sub-menu, click 'Add' hyper-link
- Enter 'upstream' in the name and the main repository url (i.e. https://github.com/FireflyMigration/firefly-doc) in Fetch
- Click Save
This create a connection to the main repository named 'upstream' that will allow us to get the latest change from it.
Pulling updates from the main (upstream) repository
Sooner or later, the main repo will have updates that you will want to pull into your fork.
If you go to your fork's GitHub web page you will see that there is a line just before the description of the files in the repo that indicates if your fork is ahead, behind or in sync with the master branch of the original repo.
To pull the latest changes and bring your fork up date:
- Click View-> Team Explorer
- Click on the Home button
- Click on Sync
- Click on Fetch
- In the combo-box select upstream
- Click on the Fetch button
This will fetch all the changes from the 'upstream' repository and put them in the LOCAL repository.
Notice that this does not change any existing branch.
Merging the changes from upstram/master branch into the local master branch
- Click View-> Team Explorer
- Click on the Home button
- Click on Branches
- Make sure that master is the active branch (it should be bold). If not double click on master to make it the active branch. You may have to commit all the current changes before you can switch branches.
- Right click the master branch and select 'Merge from..'
- Select upstream/master in 'Merge from branch:'combo-box
- Click Merge
Pushing the local repository to your GitHub fork
- Click on View-> Team Explorer
- Click on the Home button
- Click Sync
- Click on the 'Push' hyper-link
- Select 'origin' in the first combo-box
- Select 'master' in the second combo-box
- Click Push
Go to your GitHub web page for the fork and make sure that you see a line that says:'This branch is even with FireflyMigration:master.'
Contributing to the main repository using Pull Request
Creating a pull request to the main repository starts by creating a local branch for your work and pushing this branch to your GitHub fork.
At this point you should already be up-to-date with the main repository.
Create a local branch
- Click on View -> Team Explorer
- Click on the Home button
- Click on Branches
- Right click on master and select 'New Local Branch From..'
- Enter a branch name
- Select 'master' in the combo-box
- Click on Create Branch button
Publish the branch
Once your work is done and committed to your local new branch you need to push it to the GitHub fork
- Click on View -> Team Explorer
- Click on the Home button
- Click on Branches
- Right click your new branch and select 'Publish Branch'
This creates a new branch in your GitHub Fork that is tracked by the local branch with the same name.
Create a pull request
- Go to your fork page on GitHub website
- Near the top left side, change the active branch to your new branch
- Click on the 'New Pull Request' button next to the branch name.
- Enter a description and submit
Create a pull request by Visual Studio
- Click on View -> Other Window -> Github
- Click on Create New
- Select FireflyMigration:master < Name of the new branch
- Click on Create pull request button
or email us at info@fireflymigration.com3rd Aug 2018
Today we're going to talk about Git. You're going to learn what is Git and how to setup a Git client on your computer.
What is Git?
Imagine you're playing a game. In this game, you can create save points. When you die in the game, you will need to load your game and continue from your save point.
If you didn't create a save point, you will start all the way at the beginning of the game again. That's not a fun experience, so its always a good idea to save your game.
Git is like a save point system for your work. You can create save points. In Git we call each save point a commit.
When you create a commit in Git, you can load your work from that commit. If you create five commits, you can load your work from any of these commits.
That's what Git is for. We call it a version control system because you can save and load your work from any commit.
Choosing a Git Client
Many people teach you how to use Git with a command line, but that can be scary for beginners.
We're going to throw away the command line and use applications to help you get started with Git. These applications are also known as Git clients.
My favorite Git Client is Tower. It is extremely powerful. The only downside to Tower is it costs $55.20 each year. If you're new to programming, you might not want to start with Tower. You might want to try a free application instead.
Here are some good free apps:
Sourcetree is probably the best free app out there. It is good and has features on par with Tower. But Sourcetree can be buggy, and you might not be able to resolve the errors yourself. (I tried, and I couldn't).
GitKraken is another popular app that many people like. I believe GitKraken is too fancy and focuses on the wrong things though.
Git Client For Windows
Fork looks clean and simple, and is pretty good to get started with. It's in beta right now, so its free, but you might need to pay for it later.
I'm going to show you how to setup Fork.
Setting up Fork
Here's the Welcome screen when you open up Fork for the first time:
It will ask you for your user name and your email address. These are used for identification purposes for advanced uses when there are multiple people working on the same project.
'User name' is a bit misleading because this should be your name, not an actual username.
The default source directory
Once thing I like about Fork is it asks you to set a default source directory.
Fork Git Client Open Source
Adobe lightroom classic cc 8 3 1. This means the projects you copy (or clone) with Git will automatically go into the specified folder, which makes it easy to find. Cisdem video converter 5 2 0 2.
Initializing a Git repository
There are two ways to create a Git repository.
Before you create a Git repository, you'll want to create a project folder in your source directory. Once you have a folder in your source directory, you can click on File
then Create new repository
in Fork to create your Git directory.
To check whether the Git repository is created, you can open up the project folder and check for a .git
folder. This .git
folder is a hidden folder. You need to show your hidden files to see it.
The second way to initialize a Git repository is through the command line.
To do so, you'd first want to create your project folder in your source directory. Then, you drag your project folder into the Terminal app. This will automatically navigate you to the project folder in the Terminal.
If you want to learn more about the Terminal, I recommend starting with my article on overcoming your fear of the command line.
Once you have navigated yourself to the project folder in the terminal, you can type git init
to initialize the repository
Wrapping up
Git is like a save-point system in games. You can use Git to save and load your work.
Fork Git Client Github
If you enjoyed this article, please tell a friend about it! Share it on Twitter. If you spot a typo, I'd appreciate if you can correct it on GitHub. Thank you!