Menu +

Search Posts

Category: Git *

Git Teamwork

Congratulations, you now know enough to start collaborating on Git projects! Let’s review. A remote is a Git repository that lives outside your Git project folder. Remotes can live on the web, on a shared network or even in a separate folder on your local computer. The Git Collaborative Workflow are steps that enable smooth project development when multiple collaborators are working on the same Git project. We also learned the following commands git clone: Creates a local copy of a […]

Git Branching

Let’s take a moment to review the main concepts and commands from the lesson before moving on. Git branching allows users to experiment with different versions of a project by checking out separate branches to work on. The following commands are useful in the Git branch workflow. git branch: Lists all a Git project’s branches. git branch branch_name: Creates a new branch. git checkout branch_name: Used to switch from one branch to another. git merge branch_name: Used to join […]

How to backtrack in Git

You’ve learned three different ways to backtrack in Git. You can use these skills to undo changes made to your Git project. git checkout HEAD filename: Discards changes in the working directory. git reset HEAD filename: Unstages file changes in the staging area. git reset commit_SHA: Resets to a previous commit in your commit history. Additionally, you learned a way to add multiple files to the staging area with a single command:

Adding an existing project to GitHub using the command line

Create a new repository on GitHub Open Terminal Change the current working directory to your local project Initialize the local directory as a Git repository git init Add the the files in your new local repository. git add . Commit the files that you’ve staged in your local repository git commit -m “First commit” At the top of your GitHub repository’s Quick Setup page, copy the remote repository URL In terminal, add the URL for […]

Git Introduction

Principle of operation To work with GitHub you need: Register an  GitHub account and create a repository (GitHub Repository). Install GitHub Desktop , an intuitive tool to manage Local Repository (local data repository). Configure to synchronize data with the GitHub  desktop onto Repository server. Register GitHub account First you need to register an GitHub account freely . You can go to the homepage of GitHub at: Create GitHub Repository After registration of GitHub account is completed , and log on. You can create a GitHub repository. Download & Install GitHub Desktop GitHub Desktop is essentially a […]