Distributed Version Control System - Same file in local PC.
Trunk Based Development - Suppose you release 3.8 and now want to release 4.1 version but still not completed. Your stable 3.8 version and create a branch and update until version 4.1 is finished. When 4.1 is completed then merge it.
Series - Repositories, branches, commits, and Pull Requests.
Code Maker Wants - Version, team work, improvement Analysis and historical flow.
GitHub Platform - github.com
GitHub Lab - gitlab.com. Not free but use bitbucket.org for free.
Requirements - Email account.
Repository - A single project. Combination of files, image and so on. REDME file recommend. When create repository check 'initialize this repository with a REDME' for automatically create READNE.MD file.
New branch - When we change (commit) something (insert, update, delete, whatever) it create a new branch. Suppose you delete something in branch but you find that file on master directory. Work on branch and finally marge with master branch. Don't work on master branch.
Master branch - Default branch name. Points last commit. The core path. Don't rename this folder.
Pull Request - Every one see what is the final change on master path. List of everything changes.
gitignore file - Some files aren't necessary to save to a server. We don't want people download those files. Gitignore file is the perfect way that tells what files are unnecessary.
gitignore file structure - Every line is ignored in gitignore file. a) .doc -- ignore doc file b) *.doc -- ignore all doc file c) /ept -- ignore ept folder. d)tle.png --specific file.
Push - Adding/modifying files in public repository.
Fetching - Downloading.
Git Bash Commonly used windows command (git-scm.com)
- Change directory: $ cd /c/myFile
- Folder items: $ ls
- Clear code: $clear
- Repository(like inside myFile folder)
- Initialize/create git repository (current folder): $git init myRepository {git init [repository name]} --folder creates with .git folder.
- Then go to Repository directory/folder: cd reositoryName
- Information about repository directory/folder: $git status
- Create file using notepad (windows)
- $notepad README.md
- Add/modify files to staging area
- $git add .
- $git add [file name]
- Add/modify/delete files to staging area
- $git add --all
- Commit (snapshot)
- Commit: $git commit
- Commit with massage: $git commit -m "[commit-massage]"
- Commit history: $git log
- Quit
- $q
- Combination of add and commit
- $git commit -a -m "comment"
- Branch
- Branch info: $git branch
- Create New Branch: $git branch [branch_name]
- Switch Branch: $git checkout brachName
- Create New Branch and checkout: $git checkout -b brachName
- Delete Branch: $git branch -d branchName
- Marge with master: $git merge master
- Master marge with branch [directory path master]
- $git merge branchName
- Local repository to remote repository [Bitbucket/GitHub]
- Create a repository in Bitbucket/GitHub
- Nickname the url: $git remote add [myCustomNickName] [URL]
- Show url nick name: $git remote
- $git push -u origin master [with username/password] - $git push -u myCustomNickName master
- Bitbucket to local repository
- $git clone [link]
- .gitignore
- Create .gitignore file - $touch .gitignore
- Add/Edit .gitignore file using notepad.
- $git add .
- $git commit -m "..."
- SSH keys
- Prompt massage meaning
- Initialized empty Git repository in [url] - Successfully run $git init myRepository.
- on branch master - Currently on master path(run branch master)
- Initial commit: actually not committed.
- Untracked files: Need to add. Use "git add".
- Changes to be committed - You only use $git add . but $git commit is not executed. Actually commit is not executed.
- No commits yet - you change something in folder but not committed so use $git add . and $git commit. .
- nothing to commit, working directory clean - In that folder everything is committed.
- nothing added to commit but untracked files present - use $git commit after $git add .. "
- Untrack files - Suddenly paste some files but not committed. Solve $git add . and $git commit.
- Changes not staged for commit - $git add not executed.
- 1 file changed, [3] instructions(+) create mode .... readme.md - Successfully readme.md file is change/created and saved.
- GitHub Desktop For UI (desktop.github.com)
No comments:
Post a Comment