Now, whenever you edit your project, SourceTree will know, and you can commit it. Add a "Commit Message", check the box next to Push changes immedeately to origin/master, and click Commit. You'll see whatever you added.Ĭlick Unstaged files to add 'em all, or right click a file and select Ignore if you don't want it included (creating a. Place something (I'm putting the beginnings of my homework) there and switch back to SourceTree. Now you can put whatever you want in here, and it will be backed up. In SourceTree, copy that address to the field named Souce Path/URL.Ĭlick the Name field to make sure it's populated, and make sure the destination folder is satisfactory. Click the button beside it to copy the address to your clipboard. Go back to the website where you crreated the repo and look for the HTTPS clone URL on the right. Now keep that webpage open and install Sourcetree from its website. Students get five free private repos, and can sign up for this here). (I'm making mine private as well, because this will be a homework assignment for me. This will ensure that we can immediately set it up with SourceTree. The first step is to make a GitHub account: In this blog post, I'm going to set up a repository (uesually shortened to "repo") on Github and SourceTree with a homework assignment from my Advanced Game Programming class. Git is becoming the standard source control tool, and I use a program by Atlassian called SourceTree to easily manage my repositories. When working on long or complicated projects, source control can save a lot of heartache. will add all files under current directory git add -all //find all new and updated files everywhere throughout the project and add them to the staging area Powershell/Linux commands ls //list non-system files in directory ls -a //lists all folders and files cd folder //changes directory into a folder cd. git commit -m "Initial commit" git push -u origin master Push an existing Git repository cd existing_repo git remote rename origin old-origin git remote add origin git push -u origin -all git push -u origin -tags Git Workflow commands git init //initialize a folder to git git add filename //move the file from unstaged to staged git rm -cached filename //moves it from staged to unstaged git reset filename //moves it from staged to unstaged git add. The following commands will help upload existing files from your local machine Git global setup git config -global user.name "your user.name" git config -global user.email " Create a new repository git clone cd YourNewProject touch README.md git add README.md git commit -m "add README" git push -u origin master Push an existing folder cd existing_folder git init git remote add origin git add.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |