Skip to main content

how to setup git in windows machine



how to setup git in windows machine
#install github for windows - https://git-for-windows.github.io/
#create folder
#select folder right click and git bash here
in cmd line use
or create a new repository on the command line

echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/spectrumted/test.git
git push -u origin master

…or push an existing repository from the command line

git remote add origin https://github.com/spectrumted/test.git
git push -u origin master

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
to add git on webserver
download putty
give cpanel domain as host port 22 then ok
enter username password
then at the root cpanel

From your home directory( cd ~/ ), get the rpm:
$ wget http://pkgs.repoforge.org/git/git-1.7.9.6-1.el5.rf.i386.rpm
Install & Configure Git
Unpack git using rpm2cpio and cpio:
        mkdir ~/opt
        cd ~/opt
        rpm2cpio ~/git-1.7.9.6-1.el5.rf.i386.rpm | cpio -id      
Check that it is installed:
        ~/opt/usr/bin/git --version
        git version 1.7.9.6      
Configure git to work on your path and not to do SSL verification. Create a ~/.bash_profile file, if not already existing and add the following to it:(use vi ~/.bash_profile)
        export GIT_SSL_NO_VERIFY=true
        PATH=$PATH:$HOME/opt/usr/bin
        export PATH
        GIT_EXEC_PATH=$HOME/opt/usr/libexec/git-core
        export GIT_EXEC_PATH      
Check these settings by logging out and back in. Then check the version:
        git --version
        git version 1.7.9.6
       
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
to undo a commit
git reset --hard HEAD~1
will get u back by one commit
git reset --soft HEAD^     # use --soft if you want to keep your changes
git reset --hard HEAD^     # use --hard if you don't care about keeping the changes you made

Now git log will show that our last commit has been removed.
How to undo a public commit

If you have already made your commits public, you will want to create a new commit which will "revert" the changes you made in your previous commit (current HEAD).

git revert HEAD
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Change the URI (URL) for a remote Git repository
git remote -v
# View existing remotes
# origin  https://github.com/user/repo.git (fetch)
# origin  https://github.com/user/repo.git (push)

git remote set-url origin https://github.com/user/repo2.git
# Change the 'origin' remote's URL

git remote -v
# Verify new remote URL
# origin  https://github.com/user/repo2.git (fetch)
# origin  https://github.com/user/repo2.git (push)

Comments

Popular posts from this blog

Send push motification to iphone and android code

Send push motification to iphone and android code function sendIphoneAdminPush($token,$message) { $streamContext = stream_context_create(); $badge = 0; //$message = "Here is the new deal having 50% discount for business ABC."; //$token = "ghjkghkgkghkghkjghkghkghjkhkghkghjkhkhgjkhgj"; stream_context_set_option($streamContext, 'ssl', 'local_cert', $_SERVER['DOCUMENT_ROOT'].'/nodatapp/pem/pushNew.pem'); $apns = stream_socket_client( //'ssl://gateway.sandbox.push.apple.com:2195', 'ssl://gateway.push.apple.com:2195', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); $load = array(   'aps' => array(   'alert' => $message,   'badge' => $badge,   'sound' => 'default',   'data' => array( 'push_type' => "IphonePush" )   )   ); $payloa...

angular2-color-picker TypeError: Cannot read property 'substr' of undefined - source-node.js

angular2-color-picker TypeError: Cannot read property 'substr' of undefined - source-node.js if you install npm i --save angular2-color-picker and get node error  TypeError: Cannot read property 'substr' of undefined - source-node.js TypeError : Cannot read property 'substr' of undefined at Function .< anonymous > ( E : \Documents\Year_3\Mobile_Application_Development\mammoth - v2\node_modules\webpack - sources\node_modules\source - map\lib\source - node . js : 95 : 30 ) at Array . forEach ( native ) at BasicSourceMapConsumer . SourceMapConsumer_eachMapping [ as eachMapping ] ( E : \Documents\Year_3\Mobile_Application_Development\mammoth - v2\node_modules\webpack - sources\node_modules\source - map\lib\source - map - consumer . js : 155 : 14 ) at Function . SourceNode_fromStringWithSourceMap [ as fromStringWithSourceMap ] ( E : \Documents\Year_3\Mobile_Application_Development\mammoth - v2\node_mod...

If location on IOS do not work with geolocation

If location on IOS do not work with geolocation iOS Quirks Since iOS 10 it's mandatory to add a NSLocationWhenInUseUsageDescription entry in the info.plist. NSLocationWhenInUseUsageDescription describes the reason that the app accesses the user's location. When the system prompts the user to allow access, this string is displayed as part of the dialog box. To add this entry you can pass the variable GEOLOCATION_USAGE_DESCRIPTION on plugin install. Example: cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="your usage message" If you don't pass the variable, the plugin will add an empty string as value. To solve your problem, try: Uninstall the plugin: cordova plugin remove cordova-plugin-geolocation Reinstall with: cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION= "my_project would like to use your location" platform/ios/{project}/{project}...